core/tests/components/statistics
Brenan Kelley 458c5ae657
Add statistics keep_last_sample option (#88655)
* introduce preserve last value option

* improve comments

* add unit test

* skip scheduling purge on a preserved value

* do not schedule sensor update if preserving last value

* fix unit test to use new mock time pattern

pattern introduced in https://github.com/home-assistant/core/pull/93499

* rename preserve_last_val to keep_last_sample

* add keep_last_sample config validation
2024-02-27 13:17:05 +01:00
..
fixtures
__init__.py
test_sensor.py Add statistics keep_last_sample option (#88655) 2024-02-27 13:17:05 +01:00