Erik Montnemery
2f8e65a9b0
Store deleted duplicated statistics in .storage ( #62574 )
2021-12-22 14:27:56 +01:00
Erik Montnemery
48b3d6e1c0
Save original + duplicate pairs when deleting duplicated statistics ( #62498 )
2021-12-21 15:24:36 +01:00
Erik Montnemery
cab2a74b5f
Don't pollute config dir with deleted duplicated statistics ( #62489 )
2021-12-21 14:27:35 +01:00
Erik Montnemery
474ef54477
Fix threading error in recorder tests ( #62187 )
2021-12-17 13:17:48 +01:00
Erik Montnemery
bceeaec2f8
Remove duplicated statistics rows ( #61146 )
...
* Remove duplicated statistics
* Fix misleading docstring
* Pylint knows best
* Correct test
* Oops
* Prevent insertion of duplicated statistics
* Tweak
* pylint
* Add models_schema_23.py
* Tweak
2021-12-13 14:15:36 +01:00
Erik Montnemery
dc5888ab4a
Correct recorder.statistics.get_last_statistics ( #61421 )
2021-12-10 10:09:29 -08:00
Erik Montnemery
bcd9f3c05f
Correct end time for monthly statistics summary ( #59551 )
...
* Correct end time for monthly statistics summary
* Add tests
2021-11-12 15:01:40 +01:00
Erik Montnemery
ac5e32d648
Corrections for external statistics ( #58469 )
2021-10-26 14:05:45 +02:00
Erik Montnemery
f594bc353b
Add support for external statistics ( #56607 )
...
* Support external statistics
* Update tests
* Lint
* Adjust code after rebase
* Separate external statistic_id with :, add name to metadata
* Adjust tests
* Simplify get_metadata_with_session
* Address review comments
* Allow updating external statistics
* Validate input
* Adjust tests after rebase
* Pylint
* Adjust tests
* Improve test coverage
2021-10-26 10:26:50 +02:00
Erik Montnemery
40ecf22bac
Remove automatic splitting of net meters from statistics ( #56772 )
2021-09-29 17:20:17 +02:00
Erik Montnemery
92253f5192
Minor refactoring of periodic statistics ( #56492 )
2021-09-22 13:31:33 -07:00
Erik Montnemery
8c5efafdd8
Add 5-minute statistics for sensors ( #56006 )
...
* Add 5-minute statistics for sensors
* Address pylint issues
* Black
* Apply suggestion from code review
* Apply suggestions from code review
* Improve tests
2021-09-16 10:57:15 +02:00
Erik Montnemery
d2a9f7904a
Include end time of statistics data points in API response ( #56063 )
...
* Include end time of statistics data points in API response
* Correct typing
* Update tests
2021-09-13 10:02:24 +02:00
Erik Montnemery
80fd330479
Add sum_decrease and sum_increase statistics ( #55850 )
2021-09-08 23:35:53 -07:00
Erik Montnemery
27764e9985
Fix handling of imperial units in long term statistics ( #55959 )
2021-09-08 08:08:48 -07:00
Erik Montnemery
22e6ddf8df
Do not let one bad statistic spoil the bunch ( #55942 )
2021-09-08 07:55:40 -07:00
Erik Montnemery
8877f37da0
Fix statistics for sensors setting last_reset ( #55136 )
...
* Re-add state_class total to sensor
* Make energy cost sensor enforce state_class total_increasing
* Drop state_class total
* Only report energy sensor issues once
2021-08-24 17:02:34 +02:00
Erik Montnemery
32e297f4a0
Compile missing statistics ( #54690 )
2021-08-19 22:10:45 -07:00
Erik Montnemery
e1926caeb9
Remove STATE_CLASS_TOTAL and last_reset from sensor ( #54755 )
...
* Remove STATE_CLASS_TOTAL
* Update mill sensor
* Update tests
* Kill last_reset
* Return ATTR_LAST_RESET to utility_meter
* Update energy cost sensor
* Restore last_reset for backwards compatibility
* Re-add and update deprecation warning
* Update tests
* Fix utility_meter
* Update EnergyCostSensor
* Tweak
* Fix rebase mistake
* Fix test
2021-08-18 10:03:27 +02:00
Erik Montnemery
e541bcd54d
Update statistics meta data on entity_id change ( #52755 )
2021-07-14 13:23:11 +02:00
Erik Montnemery
11fd9d9525
Avoid duplicated database queries when fetching statistics ( #52433 )
2021-07-02 15:40:54 +02:00
Erik Montnemery
0476c7f9ee
Normalize temperature statistics to °C ( #52297 )
...
* Normalize temperature statistics to °C
* Fix tests
* Support temperature conversion to and from K, improve tests
* Fix test
* Add tests, pylint
2021-06-30 14:17:58 +02:00
Paulus Schoutsen
805ef3f90b
Allow fetching multiple statistics ( #51996 )
2021-06-18 21:03:13 +02:00
Erik Montnemery
39c94e8daa
Fix flaky statistics tests ( #51214 )
...
* Fix flaky statistics tests
* Tweak
2021-05-28 22:37:17 +02:00
Erik Montnemery
b339d73109
Weight sensor average statistics by state durations ( #51150 )
...
* Weight sensor average statistics by state durations
* Fix test
2021-05-28 13:16:52 +02:00
Erik Montnemery
e16a8063a5
Compile statistics for energy sensors ( #50829 )
...
* Compile statistics for energy sensors
* Update tests
* Rename abs_value to state
* Tweak
* Recreate statistics table
* Pylint
* Try to fix test
* Fix statistics for multiple energy sensors
* Fix energy statistics when last_reset is not set
2021-05-20 13:05:15 +02:00
Erik Montnemery
89dd3292ba
Initial draft of statistics ( #49852 )
2021-05-16 10:23:37 -07:00