Hello,
I am trying to add a dehumidifier energy sensor (which is essentially the same way as fridge energy sensor). Both dehumidifier energy and fridge energy sensors are defined the same way – a sensor that estimated the current power → integration sensor that estimates energy. While I was able to add the fridge energy sensor in the past, Home Assistant doesn’t offer me to add the dehumidifier energy sensor to the Energy dashboard. Why? How can I adjust the sensor to be able to add it to the Energy dashboard?
Note that I’ve added the customize_glob part when resolving the inability to add the fridge sensor. I know that the “glob” is not much a glob and there would be probably an easier way, but I’ve just copied what I’ve found somewhere without much adjustments.
I see there is missing "state_class": "measurement" in the dehumidifier power sensor. However, both energy sensors have essentially the same attributes (Developer Tools » States):
state_class: total_increasing
source: sensor.fridge_estimated_power
unit_of_measurement: kWh
device_class: energy
icon: mdi:chart-histogram
friendly_name: fridge energy
last_reset: 1970-01-01T00:00:00+00:00
state_class: total_increasing
source: sensor.dehumidifier_estimated_power
unit_of_measurement: kWh
device_class: energy
icon: mdi:chart-histogram
friendly_name: dehumidifier_energy
last_reset: 1970-01-01T00:00:00+00:00
Anyway, I’ve added the "state_class": "measurement", but it has changed nothing.
I know the formula for dehumidifier is a bit obscure, came from a transpiler (sort of) PoC that also tries to fail on unexpected boolean inputs. But I don’t think it matters there. The overuse of quotes has a similar reason – the YAML library I use does this in the best settings I’ve found, finding something better wasn’t a priority.
On globs: Thank you. I just wanted to mention something like “I know this is stupid, it was just not my priority.”
On last reset: Thank you. This was copied from somewhere on this forum. I’ll look at it.
WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.dehumidifier_energy (kWh) can not be converted to the unit of previously compiled statistics (None).
I’ve changed the entity name and id in order to get rid of this issue. Now, it can be added on the energy dashboard.