core/tests/components/utility_meter
Diogo Gomes b211a1faa7
Fix utility meter restore state (#66490)
* Address #63874

* avoid setting _last_period to None

* name is always set in discovery

* ValueError never happens only DecimalException

* async_tariff_change tracks state change - state machine will not pass a None

* test we only reset one utility_meter

* test corrupted restored state

* pretty sure _current_tariff doesn't change from init until here

* missing assert

* Revert "async_tariff_change tracks state change - state machine will not pass a None"

This reverts commit 24fc04a964.

* address review comment

* always a Decimal
2022-02-15 02:16:30 +01:00
..
__init__.py
test_init.py Fix utility meter restore state (#66490) 2022-02-15 02:16:30 +01:00
test_sensor.py Fix utility meter restore state (#66490) 2022-02-15 02:16:30 +01:00