[Suggestion] Energy

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.

Not Hubitat, but I do know my Kasa smart plugs (with no energy monitoring) track runtime. As you said, you know the voltage, you can approximate the amps, that will will get you power. Times runtime is the energy.

I don't know if it will help, but there are some smart plugs that have energy measurement and are supported by community drivers... No graphs, but you still may control the energy usage.

Not really what I'm looking for in this case.
I have some Z-wave Neo Coolcam smart plugs with monitoring for dishwasher, laundry machine and stuff like that. I know they exist and what I want to use them for.

My idea here is for those devices where it wouldn't make sense to use a smart plug, like for example, a Hue LED strip.
I know what it uses when fully on, and I know what it uses what it's "off" (standby) (Signify has that information on their site).
That information can be tracked in the driver, per device. Not 100% accurate, I know, but close enough so that you can draw data from it.

Graphs and niceties like that are not important, as you can do that yourself if wanted. But the data needs to be there.