esphome / esphome/feature-requests
Make sensor filters (e.g. median / average / quantile) work with deep sleep
- 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**
To my knowledge / research at least some sensor filters like average, median, quantile, etc. do not work with deep sleep. To be more precise, these filters reset / lose their state after every deep sleep. Thus those filters are currently not usable for devices that simply read sensors, submit values and then immediately go back to deep sleep to save energy. This is a feature request to implement these sensor filters for deep sleep.
**Please describe your use case for this integration and alternatives you've tried:**
Use case is for e.g. battery operated devices which need deep sleep with sensors for sensor input smoothing, outlier filtering, etc.
**Additional context**
- As of today, this can only be implemented manually by the user with additional code / lambas / variables.
- Depending on where the state is saved, an implementation likely has to watch memory constraints on chips if deep sleep memory / RTC memory is used which is ususally very constrained.
- As a first step, this is probably a lot easier to implement for filters which only need very little state (e.g. exponential moving average).
- The documentation should be updated to reflect which filters lose state on deep sleep.
Contributor guide
No contributing guide indexed for this repository
Research direction
The request does not name files, tests, or entry points. Start by locating the sensor filter implementations and deep-sleep state handling, then determine which filters lose state and what memory is available on supported chips. Done means supported filters retain the required state across deep sleep and the documentation identifies filters that do not.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100