Template Sensor Value unavailible after HA restart, until reload in Settings


I have some trouble with this Sensor Template:

  - sensor:
      - name: PV Leistung Gesamt
        state: >
            {{ (states('sensor.zeverSolar_generated_power')|float + states('sensor.zeverSolar2_generated_power')|float)}}
        unit_of_measurement: W
        state_class: total
        device_class: power

After an reboot of the HA the Value is missing until I click on “reload YAML-Configuration → Template Entities” in the Settings Section.

Maybe this is because bothe sensors (zeverSolar & zeverSolar2) are from an AppDaemon Script?

And the Sensor Values are not present at the point there the template is set up?


I cannot tell as your script is not known to me but you can add ‘availability’ statement to the template to gain a bit more control

availability: >
          {{ states('states('sensor.zeverSolar_generated_power') not in [ unknown, unavailable, none ] }}
1 Like