core/tests/components/utility_meter
gibwar 52fe0a5e96
Fix utility meter reset without tarrifs (#102884)
* Fix utility meter reset without tarrifs

When using a utility_meter helper set up with a "Meter reset cycle" of
"No cycle" it is impossible to properly reset the meter to 0 and utilize
the "last reset" and "last period" attributes on the helper.

With these changes the service call can now directly reset a meter in
such a configuration and the UI selector has been updated to include
utility meters in the selection list.

Fixes #96920

* Undo UI target selection modes

As requested to not cause confusion by being able to reset individual
meters when using multiple tariffs.

* Adjust logic to only reset standalone sensors

The original logic would allow resetting meters with multiple tariffs
which was an unintended side effect.
2024-03-01 16:44:24 +01:00
..
__init__.py
test_config_flow.py
test_init.py Fix flakey utility meter test (#111400) 2024-02-25 20:21:09 +01:00
test_sensor.py Fix utility meter reset without tarrifs (#102884) 2024-03-01 16:44:24 +01:00