Helper Sum "Unavailable"


In quite a few scenarios I use helpers to combine values of several entities. (“SUM”)


If one of these sensors becomes unavailable:
the helper becomes unavailable, otherwise it nicely shows the sum value.

As a result I cannot use the GUI and have to revert to YAML confuguration:

  - sensor:
    - name: "Electricity OFFICE Total"
      unit_of_measurement: "kWh"
      state: >
        {{ (states('sensor.shelly_officedesk_power') | float(0) + states('sensor.shelly_officeac_power') | float(0) + states('sensor.shelly_officeequipment_power') | float(0) ) | round(1) }}

With the YAML config the ‘fallback value’ of these entities is 0 (| float(0))

All of the other settings of this helper do seem to deal with the unavailable sensor: Minimum, Maximum, Arithmetic mean, median, most recently updated, statistical range, except for sum.

Would it make sense that a SUM helper ignores “unavailable” entities in its configuration?

1 Like

if you have a solution, please let me know. i would also be interested. i also had to solve it with a float 0 and am not happy with this solution.