I’ve created a few energy sensors at configuration.yaml -
mqtt:
sensor:
- state_topic: "oico/energy-meter/t1"
unique_id: "energy_meter_t1"
name: "energy_meter_t1"
device_class: energy
state_class: total
unit_of_measurement: kWh
- state_topic: "oico/energy-meter/t2"
unique_id: "energy_meter_t2"
name: "energy_meter_t2"
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
- state_topic: "oico/energy-meter/t3"
unique_id: "energy_meter_t3"
name: "energy_meter_t3"
device_class: energy
state_class: total_increasing
unit_of_measurement: kWh
just to verify how it works I’ve updated them with some values -
service: mqtt.publish
data:
topic: oico/energy-meter/t2
payload_template: 2000
(the idea is to update its values thru pyscript by getting the data by API from the grid provider)
Now, when I go to Settings - Dashboards - Energy - Grid consumption / add consumption, I don’t see these sensors there - No matching statistics found
.
What is wrong with my sensors?
I’ve also noticed that the History is not available for my sensors - No state history found
.