Im trying to monitor all my power consumption, and was curious how much my (smart) lights contribute to my overall bill.
First I made a template sensor that tracks the light’s power consumption, for instance, for a 6W zigbee light in my study:
- name: "light_buro_lamp_pc_power"
unit_of_measurement: W
state: >
{% if is_state('light.buro_lamp_pc', 'on') %}
{% set brightness = states.light.buro_lamp_pc.attributes.brightness | int %}
{{ 6 * (brightness | float / 255) + 0.6 | round(2) }}
{% else %}
0.6
{% endif %}
I then combine lights in to room sensors like:
- name: "room_light_buro_power"
unit_of_measurement: W
state: >
{{
states('sensor.light_buro_spots_power') | float +
states('sensor.light_buro_lamp_pc_power') | float +
states('sensor.light_rgb_strip_buro_power') | float
}}
This works fine. I then create an integration sensor, like I have done for some smart plugs that provide W but not kWh:
- platform: integration
source: sensor.room_light_buro_power
name: Buro licht kWh
unit_prefix: k
round: 3
This again seems to work fine, I get a sensor that tracks power consumption for all lights in the study, the unit is kWh:
However, I can not add this device (or any other of my room light power consumption sensors) to my energy panel. I created them 20+ hours ago, they still dont show up. I created some other integration sensors to track smart plugs, they look identical and they could be added just fine.
Help? Is there maybe a limit to how many devices I can add to the energy panel?
BTW, ideally all this would be done “automagically”, see my feature request here