Open mmiller7 opened 3 days ago
Hey there @thomdietrich, mind taking a look at this issue as it has been labeled with an integration (statistics
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
statistics documentation statistics source (message by IssueLinks)
The problem
Since 2024.11.0, the statistics platform seems broken with a sample_size of 2 set (which should compute on only the most recent 2 data-points). This worked correctly up thru 2024.10.4. The buffer usage always stays at zero.
Example code:
In this example, the source sensor is SNMP with update interval between 1 and 5 seconds.
Expected behavior: compute change between last 2 intervals, as long as there have been at least 2 samples within max_age
Actual behavior: sensor initializes without errors but remains "unknown" with buffer usage of zero.
Additional interesting notes: Setting sample_size to 3 makes it work.
What version of Home Assistant Core has the issue?
core-2024.11.3
What was the last working version of Home Assistant Core?
2024.10.4
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/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Expected behavior: compute change between last 2 intervals, as long as there have been at least 2 samples within max_age
Actual behavior: sensor initializes without errors but remains "unknown" with buffer usage of zero.
Additional interesting notes: Setting sample_size to 3 makes it work.
Screenshot of sensor from previous working version:
Screenshot of sensor after updating to 2024.11.x (all versions since 2024.11.0 seem affected)