Hi community,
I’m trying to create a custom sensor for my solar rectifier so that it shows “0” Watts during the night when the rectifier is in a not available state.
sensor:
- platform: template
sensors:
pv_leistung_korrigiert:
friendly_name: "PV Leistung (Korrigiert)"
unique_id: "pv_leistung_korrigiert"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% if states('sensor.solar_gesamtleistung') in ['unknown', 'unavailable', 'none'] %}
0
{% else %}
{{ states('sensor.solar_gesamtleistung') | float }}
{% endif %}
Config check is fine. Nevertheless, the sensor “pv_leistung_korrigiert” is not available when I try to add it to my dashboard as an entity.
What am I missing here?
Thanks for any help