Gr1pen
(Tonny Andersson)
1
I have created two MQTT sensors that provides the value of the energy, in KWh, charged and discharged from my ESS (Energy Storage System).
My issue is that when adding a battery to the energy dashboard in HASS these sensors are not available for selecting.
What are the requirements for them to show up and be selected from that list?
ddaniel
(Daniel Dekovic)
2
I believe your sensors should have those types of data defined if you want to add it to energy dashboard.
unit_of_measurement: kWh
device_class: energy
Gr1pen
(Tonny Andersson)
3
Thanks for your really quick response. I dont have: ‘device_class: energy’ so I will add it and see if that helps!
Gr1pen
(Tonny Andersson)
4
Still not working…
The sensor config looks like this:
mqtt:
sensor:
- name: "EnergyToBattery"
state_topic: "CerboGX/KWhToBattery"
unit_of_measurement: "kWh"
device_class: energy
unique_id: "EnergyToBattery"
- name: "EnergyFromBattery"
state_topic: "CerboGX/KWhFromBattery"
unit_of_measurement: "kWh"
device_class: energy
unique_id: "EnergyFromBattery"
ddaniel
(Daniel Dekovic)
5
Check sensor states in developer tools.
It can take a while for them to appear.
Gr1pen
(Tonny Andersson)
8
I’ll just (impatiently) wait a while then
Gr1pen
(Tonny Andersson)
9
I got it working after adding:
state_class: total_increasing