Commit graph

7 commits

Author SHA1 Message Date
Erik Montnemery
c785db4ffa
Normalize energy statistics to kWh (#52238) 2021-06-29 12:20:10 +02:00
Erik Montnemery
a374e24843
Add monetary sensor device class (#52087)
* Add total_cost sensor device class

* Change to DEVICE_CLASS_MONETARY
2021-06-23 15:32:25 +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
6f26687aa7
Compile statistics for battery, humidity and pressure sensors (#50920) 2021-05-21 10:48:11 +02:00
Daniel Hjelseth Høyer
fd2e640c74
Use sensor constants in recorder (#50906)
Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
2021-05-20 18:23:00 +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