Hello everyone!
I’m trying to configure Energy dashboard with no luck.
I already read all posts about this topic but I’m still not able to solve my problem.
I read my house energy consumption from a shelly EM that communicate with HA through MQTT.
I already added “state_class”, “device_class” and “last_reset” but sensor still not shown on Energy dashboard.
My HA version is 2021.10.6 and Homeassistant OS 6.5.
This is my sensor:
sensor:
- platform: mqtt
name: "Shelly EM Consumo Casa energy"
state_topic: "shellies/shellyem_quadro/emeter/0/total"
unit_of_measurement: "kWh"
value_template: "{{ (value|float / 1000 ) | round (3) }}"
device_class: energy
state_class: measurement
last_reset_topic: "shellies/shellyem_quadro/emeter/0/total"
last_reset_value_template: "1970-01-01T00:00:00+00:00"
I also tried with a template sensor:
template:
- sensor:
- name: "House electricity energy"
unit_of_measurement: "kWh"
state: >
{{ states("sensor.shelly_em_consumo_casa_energy") }}
device_class: energy
state_class: measurement
attributes:
last_reset: "1970-01-01T00:00:00+00:00"
What am I missing?
Are there something else to enable on configuration.yaml?
Thanks!