esphome / esphome/feature-requests
MH-z19 Preheating time
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
When the MH-Z19 sensor first starts up the first few sensor readings are erroneous and should not be recorded.
Reading the documentation for esphome it states that the `setup()` method should not block. Therefore what I am proposing is to store the time that the setup method was called and then comparing that to the current time inside the `update()` method. If it exceeds the threshold then the sensor reading is recorded, otherwise a “sensor is warming up” debug message is added to the logs.
Would this proposal be acceptable?
**Please describe your use case for this integration and alternatives you've tried:**
N/A
**Additional context**
Warmup time on other projects has been set to ~2mins
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files or tests; locate the MH-Z19 sensor integration and its setup() and update() entry points first. Confirm how startup time and sensor readings are handled, then verify that readings are ignored during the warmup interval and that a debug message is emitted until warmup completes.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100