Attribute defined entity cannot be added to energy dashboard
See original GitHub issueI have my bathroom floor heating configured as follows:
- platform: powercalc
entity_id: climate.bathroom_thermostat
fixed:
states_power:
heat|OFF: 0
heat|ON: 400
The power and energy entities are correctly created and reflect the state of the heating:
Power:
sensor.bathroom_thermostat_power
400.0
source_entity: climate.bathroom_thermostat
source_domain: climate
unit_of_measurement: W
friendly_name: Bathroom Floor power
device_class: power
Energy:
sensor.bathroom_thermostat_energy
0.0710
state_class: measurement
source: sensor.bathroom_thermostat_power
source_entity: climate.bathroom_thermostat
source_domain: climate
unit_of_measurement: kWh
friendly_name: Bathroom Floor energy
icon: mdi:lightning-bolt
device_class: energy
last_reset: 1970-01-01T00:00:00+00:00
however when I try to add the the energy entity as as individual device to the energy dashboard it’s not listed and cannot be added, Bathroom Thermostat is missing:
I do have 20+ other powercalc entities (light/switch) defined, all those show up as expected so the only difference I see in this one is that it’s defined as an attribute.
For example this entity shows up correctly (as you can see above)
- platform: powercalc
entity_id: light.bathroom_mirror
linear:
min_power: 0
max_power: 80
name: Bathroom Mirror Light Power
for completeness this is what the attributes of the related energy entity look like (I don’t see anything extra not defined in the entity not working correctly)
state_class: measurement
source: sensor.bathroom_mirror_light_power
source_entity: light.bathroom_mirror
source_domain: light
unit_of_measurement: kWh
friendly_name: Bathroom Mirror Light energy
icon: mdi:lightning-bolt
device_class: energy
last_reset: 1970-01-01T00:00:00+00:00
Let me know if you need any other details to troubleshoot this (or whether this is more of an HA issue than Powercalc)
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
For what it’s worth my own issue was resolved once I updated to the 2021.9.3 .2 and below seems to have this issue at least for me.
@Plawasan have you updated yet?
@Plawasan very strange behaviour. I have no clue. Seems like a bug in energy dashboard, especially since you are also able to reproduce missing entity by defining integration sensor yourself. Not able to reproduce this issue myself (yet). I would suggest you post this on HA forum, or home assistant core issue tracker. Hopefully someone of HA community knows cause and solution.