Commit Graph

24 Commits (0e3f7bc63aecc71685536f2121d3fecbc24bd642)

Author SHA1 Message Date
Franck Nijhof 5c1be2f99d
Add unique ID to energy sensors (#70378) 2022-04-26 23:14:16 -07:00
Marc Mueller ac50248938
Add type ignore error codes [other] (#66781) 2022-02-17 23:10:25 -08:00
Marc Mueller 3e51659ba7
Remove some unused TypeVars (#63346) 2022-01-04 15:38:34 +01:00
epenet df608b56a5
Use new enums in energy (#61386)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-10 08:40:53 +01:00
Marc Mueller 4c68662612
Use assignment expressions 34 (#58823) 2021-10-31 19:01:16 +01:00
Erik Montnemery a0a8b9db26
Add entity category 'system' (#58595)
* Add entity category 'hidden'

* Update cloud

* Update Google assistant

* Update Alexa

* Fix tests

* Add ENTITY_CATEGORIES constant

* Rename ENTITY_CATEGORY_HIDDEN to ENTITY_CATEGORY_SYSTEM

* Correct import in motioneye
2021-10-28 14:36:41 +02:00
Erik Montnemery f228537458
Fix energy cost sensor for MWh + improve tests (#58540) 2021-10-27 19:07:05 +02:00
Colin Robbins 39998f5387
Add kWh as cost option for gas (#58426)
* Add kWh as cost option for GAS

* Add kWh as cost option for GAS (pylint)

* Add kWh as cost option for GAS (make CONST)

* Change GAS_UNITS to VALID_ENERGY_UNITS

* Add test for Gas cost in kWh (2)

* Back off ENERGY_WATT_HOUR - unlikely for gas

* Add MEGA_WATT_HOUR support (2)

* Normalise pricing for MEGA_WATT_HOUR

* Normalise pricing for MEGA_WATT_HOUR
2021-10-27 18:06:32 +02:00
Erik Montnemery 547e36ae94
Tweak energy validator (#58018)
* Tweak energy validator

* Update code and tests

* Tweak implementation

* Update tests

* Update after rebase
2021-10-22 10:38:04 +02:00
Erik Montnemery a5603c0076
Improve warning prints for sensor statistics (#57605) 2021-10-13 08:15:04 -07:00
Erik Montnemery efe467217a
Don't round in energy cost sensor (#56258) 2021-09-27 12:01:17 +02:00
Erik Montnemery 443147e132
Wait for entities when updating energy preferences (#56057) 2021-09-10 09:07:52 -07:00
Erik Montnemery 78909b5227
Add support for state class total to energy cost sensor (#55955)
* Add support for all state classes to energy cost sensor

* Fix bug, adjust tests

* Fix rebase mistake
2021-09-10 09:05:32 +02:00
Erik Montnemery bb6c2093a2
Add support for state class measurement to energy cost sensor (#55962) 2021-09-08 12:46:28 -07:00
Erik Montnemery bb42eb1176
Warn if a sensor with state_class_total has a decreasing value (#55197) 2021-08-25 13:01:55 +02:00
Erik Montnemery fa9f91325c
Allow small dip in total_increasing sensor without detecting a reset (#55153) 2021-08-24 17:23:55 +02: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 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
Bram Kragten eb278834de
Add gas support to energy (#54560)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-08-13 10:39:16 -07:00
Erik Montnemery 41f3c2766c
Move temperature conversions to entity base class (2/8) (#54468) 2021-08-11 18:57:12 +02:00
Paulus Schoutsen 2cbcd5f2a9
Cost sensor handle consumption sensor in Wh (#53746) 2021-07-30 11:00:52 +02:00
Daniel Hjelseth Høyer 24a589961a
Energy round (#53696)
* Energy. Round cost

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Energy. Round cost

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Update homeassistant/components/energy/sensor.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-29 18:44:38 +02:00
Bram Kragten 4df56bad9e
Remove currency from energy, use core config (#53615)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:49:55 -07:00
Bram Kragten fcc6ea7497
Add energy integration (#52001)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2021-07-26 09:37:37 -07:00