Hey HA Community,
I’m trying to use the statistics sensor to compute an average of humidity. Gaps are appearing in the data, and I think it is due to the source value not changing and the statistics sensor not recognizing that the value is the same. I’ve tried to use mean and averge step with the same result. Is this a bug? Should I be using different characteristic?
EDIT:
It seems that once the max_age has been reached, there are no values to base the statistics sensor off of. The value of the source sensor is not being carried forward because there is no change. Is there a way to force a sensor update at least once per period?
Configuration is below for these sensors:
sensor:
- platform: statistics
name: "Thermostat Humidity Mean"
entity_id: sensor.thermostat_current_humidity
state_characteristic: mean
# sampling_size: 50
max_age:
hours: 1
- platform: statistics
name: "Thermostat Humidity Average Step"
entity_id: sensor.thermostat_current_humidity
state_characteristic: average_step
# sampling_size: 60
max_age:
hours: 1