Hello everyone,
I’m experiencing an issue where my sensors are not available for selection in the Energy Dashboard of Home Assistant. Below is the YAML configuration I am using for the energy management system:
# Energie-Management-System
energy:
# Erzeugung
generation:
- platform: template
sensors:
pv_production:
friendly_name: "PV Produktion"
unit_of_measurement: "W"
value_template: "{{ states('sensor.inverter_wirkleistung') | float }}"
device_class: power # Device Class for power
state_class: measurement # State Class for measurements
# Netzeinspeisung
consumption:
- platform: template
sensors:
grid_feed_in:
friendly_name: "Netzeinspeisung"
unit_of_measurement: "W"
value_template: "{{ states('sensor.power_meter_wirkleistung') | float }}"
device_class: power # Device Class for power
state_class: measurement # State Class for measurements
# Verbrauchswert (Differenz)
- platform: template
sensors:
consumption_value:
friendly_name: "Verbrauch"
unit_of_measurement: "W"
value_template: "{{ states('sensor.leistung_diff') | float }}"
device_class: power # Device Class for power
state_class: measurement # State Class for measurements
# Überschusswerte
surplus:
- platform: template
sensors:
pv_surplus:
friendly_name: "PV Überschuss"
unit_of_measurement: "W"
value_template: "{{ (states('sensor.inverter_wirkleistung') | float) - (states('sensor.leistung_diff') | float) | max(0) }}"
device_class: power # Device Class for power
state_class: measurement # State Class for measurements
Despite setting the attributes correctly, the sensors cannot be selected in the Energy Dashboard configuration. I’ve verified that the device_class
is set to power
and the state_class
is set to measurement
.
I hope someone can help me troubleshoot this issue. Thank you!
Best regards,
Alex