Commit graph

3 commits

Author SHA1 Message Date
unfug-at-github
c5ed148c52
Fix race condition in statistics that created spikes (#129066)
* fixed race condition and added test case for updates before db load

* removed duplicated code

* improved comments, removed superfluous errors / assertions

* allow both possible outcomes of race condition

* use approx for float comparison

* Update tests/components/statistics/test_sensor.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* force new state before database load in race condition test

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-10-26 09:23:47 +02:00
G Johansson
2ff88e7baf
Add preview to statistics (#122590) 2024-09-27 21:09:42 +02:00
G Johansson
3d5d4f8ddb
Add config flow to statistics (#120496) 2024-06-26 16:06:35 +02:00