I have smart lights which report their on/off status and % on/power in HA.
Given they all have the same bulbs (4W I think), would it be possible to estimate their power usage and show this in HA's energy view?
E.g.
total_power=0
for light in lights:
if light.status == "on":
total_power=+(4*light.power_level)
Then I could use a template to turn power into energy for the daily view.
Has anyone tried this? Is this a bad idea?