esphome / esphome/feature-requests
Integration sensor reset to value
- 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**
Current functionality can only reset to value zero.
## sensor.integration.reset Action
This [Action](https://esphome.io/guides/automations#config-action) allows you to reset the value of the integration sensor to zero. For example this can be used to reset the integration sensor to zero at midnight with a time-based automation.
```
on_...:
- sensor.integration.reset: my_integration_sensor
```
In new functionality I would like to optionally set value after reset.
## sensor.integration.reset Action
This [Action](https://esphome.io/guides/automations#config-action) allows you to reset the value of the integration sensor to zero or optionally specific value. For example this can be used to reset the integration sensor to value 105.
```
on_...:
- sensor.integration.reset: my_integration_sensor
value: 105
```
**Please describe your use case for this integration and alternatives you've tried:**
This could be useful to set the stored value if hardware needs replacement. Currently I have to do some tricks to increase integration sensor to specific value over time in order to set correct value.
**Additional context**
My main interest is really how to set the stored values to specific value when hardware needs to be replaced. Please advice possible methods.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the sensor.integration.reset action described in the issue and the linked ESPHome automation action guide. Trace where its YAML value is parsed and where the integration sensor reset is applied; done means accepting an optional value while preserving zero-reset behavior, with coverage for both forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100