core: Unexpected statistics state after upgrade to 2022.2.0
The problem
After upgrading to 2022.2.0, all my statistics sensors report an unexpected state. This is a screenshot of one of them:

I didn’t change anything from my configuration before nor after upgrading.
What version of Home Assistant Core has the issue?
2022.2.0
What was the last working version of Home Assistant Core?
2021.12.10
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Statistics
Link to integration documentation on our website
https://www.home-assistant.io/integrations/statistics/
Example YAML snippet
- platform: statistics
name: Temperatura
entity_id: sensor.temperatura
state_characteristic: average_linear
sampling_size: 10000
precision: 1
scan_interval: 1800
max_age:
days: 1
Anything in the logs that might be useful for us?
<Nothing relevant in logs>
Additional information
Attributes from statistics sensor:

Buffer seems nearly empty, while referenced entity sensor.temperatura is recorded correctly:

About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (3 by maintainers)
Confirmed! It is an issue with
min_maxplatform. I changed this:By this:
And now statistics sensor is not breaking at restart.
No. I restarted with this configuration and the behaviour is the same: