Extract "on" times of entities?

I’d like to be able to build a spreadsheet that shows my entities that use power and how long they were on in the previous 24 hours. If I can export the data to a spreadsheet, I can then manipulate to see what percentage of their use is of my electrical bill.

I’m trying to validate if going to a smart home with LEDS, motion sensors, and control over other items is actually saving money. And to see what areas I could still need to do some work on.

I’m hoping someone has already built an integration for this (I’m be very surprised if it hasn’t been done yet).

Thanks,
Robert

yes saving moneys with LEDS and motion sensors does save you

but then the more you lean the more you want to spend on make the house smarter.