I'm located in the EU and the energy prices over here, is running amok.
I therefore had a thought, and would like to hear how stupid this thought is.
Before Hubitat, I had a Homey for automations, that I still have plugged in as it serves some purposes still.
I noticed that they had built a database (for themselves), with the energy usage for a large part of IoT devices. As the device is on, Homey tracks the energy consumption and can give you nice graphs and such.
I'm not suggesting all of that. I'm only interested in the usage side of this.
My suggestion would be, on the drivers themselves, there could be a (hidden?) 'Energy' setting.
Turning this on would allow you to set the voltage (110/230) and the devices wattage in standby and full on.
For example, a Philips Hue E14 draws 5,2W when fully on, and 0,5W when in standby.
The rest can then be calculated using Ohm's law (ampere, kWh).
I don't think that the calculated usage should be dependent on the devices level though. Not until it's confirmed to be linear.
These numbers can then be exported to Grafana or something like that, where you could do calculations and stuff.
Or there could be an Eco app that allows you to enter tariffs and stuff like that, make graphs etc.
This is just a thought though, and it maybe that it should be done by 3rd party developers. I don't know.