1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-07 07:56:49 +01:00
Files
core/homeassistant/components
deftdawg b8ec0825d3 Add energy support to Neurio_Energy (#54445)
* - Patch Neurio_Energy to support new HA energy

Enables the Neurio Energy Meter as a Consumption device for Home Assistant Energy

* Only return last_reset value for DEVICE_CLASS_ENERGY

* Update homeassistant/components/neurio_energy/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update with recommendations from CI/Black

* Support new style typing

* Attempt setting the state_class statically

* Make state class static

* Changing state class to STATE_CLASS_TOTAL_INCREASING and removing last_reset seems to work ok

* Remove unused datetime import that was previously in last_reset

* Apply suggestions from code review

apply emontnemery's recommended changes

Co-authored-by: Erik Montnemery <erik@montnemery.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-19 09:16:08 +01:00
..
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-15 00:12:46 +00:00
2021-11-18 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-15 00:12:46 +00:00
2021-11-08 00:12:31 +00:00
2021-11-18 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-11 00:15:23 +00:00
2021-11-19 00:14:01 +00:00
2021-11-13 00:11:56 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-15 00:12:46 +00:00
2021-11-18 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-08 00:12:31 +00:00
2021-11-13 00:11:56 +00:00
2021-11-18 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-09 15:12:04 -05:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-14 00:12:48 +00:00
2021-11-14 00:12:48 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-07 10:35:50 +01:00
2021-11-14 00:12:48 +00:00
2021-11-18 00:12:48 +00:00
2021-11-13 00:11:56 +00:00
2021-11-18 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-09 00:15:20 +00:00
2021-11-15 00:12:46 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-15 19:32:50 +01:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-13 00:11:56 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-11 00:15:23 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 20:42:59 +01:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-12 00:12:35 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-16 00:18:33 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-16 00:18:33 +00:00
2021-11-17 00:13:20 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-13 00:11:56 +00:00
2021-11-13 00:11:56 +00:00
2021-11-08 00:12:31 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 21:44:45 -08:00
2021-11-17 00:13:20 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-14 00:12:48 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-10 00:17:39 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-10 00:17:39 +00:00
2021-11-14 00:12:48 +00:00
2021-11-12 22:09:07 +01:00
2021-11-10 00:17:39 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-13 00:11:56 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-10 00:17:39 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-06 16:43:29 +01:00
2021-11-16 00:18:33 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-10 00:17:39 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-14 00:12:48 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-17 00:13:20 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-08 00:12:31 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 18:16:44 +01:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-10 20:01:59 -08:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 09:49:36 -06:00
2021-11-19 00:14:01 +00:00
2021-11-16 00:18:33 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-12 00:12:35 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-13 00:11:56 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-10 00:17:39 +00:00
2021-11-14 16:59:09 +01:00
2021-11-18 00:12:48 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-06 16:43:29 +01:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-12 00:12:35 +00:00
2021-11-16 00:18:33 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 00:12:48 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-18 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-15 00:12:46 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-08 00:12:31 +00:00
2021-11-14 00:12:48 +00:00
2021-11-19 00:14:01 +00:00
2021-11-19 00:14:01 +00:00
2021-11-14 00:12:48 +00:00
2021-11-18 20:23:20 -08:00
2021-11-08 00:12:31 +00:00
2021-11-19 00:14:01 +00:00
2021-11-12 00:12:35 +00:00