1
0
mirror of https://github.com/home-assistant/core.git synced 2025-05-15 03:19:15 +00:00

9 Commits

Author SHA1 Message Date
J. Nick Koston
da4c144a5e
Fix history stats query using incorrect microseconds () 2023-04-17 11:37:30 -10:00
J. Nick Koston
e34853a82a
Switch underlying history stats calculation to use seconds ()
* Switch history stats to report in seconds

Because hours were previously used, the data would always be off because
of the loss of resolution when the time being tracked was in a window
of more than 12s

* Apply suggestions from code review

* Update homeassistant/components/history_stats/sensor.py

* tweak
2023-03-12 23:05:48 -04:00
J. Nick Koston
d3f01f7ea9
Reduce memory pressure from history_stats with large data sets () 2022-06-09 20:49:37 -07:00
J. Nick Koston
0a2a166860
Fix history stats not comparing all times in UTC () 2022-06-04 12:47:30 -07:00
J. Nick Koston
d3b1896a06
Only present history_stats state as unknown if the time is in the future () 2022-06-02 08:39:53 -07:00
J. Nick Koston
c74b241949
Include initial state in history_stats count () 2022-05-18 10:28:04 -07:00
J. Nick Koston
1dc15bb7c8
Prevent history_stats from rejecting states when microseconds differ () 2022-05-11 20:44:35 -07:00
J. Nick Koston
aafe6ff0e2
Fix history_stats for timezones with a positive offset from UTC () 2022-04-28 23:48:58 -07:00
J. Nick Koston
1d2c949c51
Convert history_stats to use a coordinator ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-04-25 15:20:06 -07:00