Add utility meter option for the sensor to always be available (#29937)

This commit is contained in:
dougiteixeira 2024-01-28 15:06:05 -03:00 committed by GitHub
parent 9e34a2b25e
commit 6d4e144635
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,6 +58,10 @@ Periodically resetting:
description: >
Enable this if the source sensor state is expected to reset to 0, for example, a smart plug that resets on boot.
When this option is disabled (for example, if the source sensor is a domestic utility meter that never resets during the device's lifetime), the _difference_ between the new value and the last valid value is added to the utility meter, which avoids the loss of a meter reading after the source sensor becomes available after being unavailable.
Sensor always available:
description: >
If activated, the sensor will always be available with the last totalized value, even if the source entity is unavailable or unknown.
You need to understand that with this option activated, when the source entity becomes unavailable, the utility meter sensor will have the last totalized value and will not change until the source entity returns to a valid state.
{% endconfiguration_basic %}
If the meter reset cycle and reset offsets are to limited for your use case,
@ -125,6 +129,11 @@ periodically_resetting:
required: false
default: true
type: boolean
always_available:
description: If activated, the sensor will always be available with the last totalized value, even if the source entity is unavailable or unknown.
required: false
default: false
type: boolean
{% endconfiguration %}
<p class='note warning'>