So I’ve done a bit of searching and scratching my head, but I’ve not been able to find out how to set up a pseudo-energy sensor in the form of a calculated value based on the known power value for a circuit and cumulative time the device is on.
This would be useful for the majority of my lights, for instance. I can easily calculate the power draw of the standard bulbs I use in my fixtures. All I need access to is the cumulative time that switch has been ON and time x power = energy. That way I could plug these calculated sensors into the HA energy dashboard and get energy stats. I know it won’t be perfect as each bulb has slightly different draw and the voltage fluctuates a bit from the power company, but it will give me a really good idea what an individual light circuit is costing me.
All my switches are ESPHome devices so I’d love to use ESPHome to do the calculation or I’m open to doing it in HA itself if necessary. What I’m not seeing in ESPHome nor HA the cumulative time a device is on. Anybody know where I can find that to use in a calculation?