I collect data from a solar diverter over a serial port and pre-process and send it to HA via MQTT using Python. So, I have full control over topics, attributes, etc.
I have configured the energy dashboard to use some of the sensors. In particular I have added the solar and grid energy used to heat the hot water to “Individual Devices”. Although both sensors are identical in terms of attributes etc., “Hot Water (Grid)” always shows zero.
These are the 2 sensors
Sensor 1
sensor.paladin_lm_total_hwc_diverted_energy
Display Name
Hot Water (Solar)
Attributes (from states tab in Developer Tools)
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
friendly_name: Paladin LM Total HWC Diverted Energy
MQTT Paladin LM debug info for sensor 15 is attached
and
Sensor 2
sensor.paladin_lm_total_hwc_top_up_energy
Display Name
Hot Water (Grid)
Attributes (from states tab in Developer Tools)
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
friendly_name: Paladin LM Total HWC Top Up Energy
MQTT Paladin LM debug info for sensor 16 is attached
“Hot Water (Solar)” (sensor.paladin_lm_total_hwc_diverted_energy) is shown just fine but “Hot Water (Grid)” (sensor.paladin_lm_total_hwc_top_up_energy) shows 0 kWh.
The history shows that both sensor have values different from 0.
Note: All total energy sensors (from the diverter) reset in the night back to 0. But this is handled correctly by the HA energy dashboard and all other sensors show just fine.
I even have turned the problematic sensor into an always increasing one in Python (detecting the reset and keep increasing the energy) but the problem persists. Further I swapped the dataof both sensors in Python but “Hot Water (Grid)” which now carries the data from “Hot Water (Solar)” still shows 0.
What can I do to get this working?