Is there any way to get the Energy Dashboard data into (template) sensors?
I’d like to use the daily/weekly/monthly/yearly consumption/solar production and more to calculate stuff, but there’s no obvious way to access it.
Yes, I could create a utility meter - but first of all that’s redundant, because that data is already stored somewhere, and secondly, the utility meter only starts to measure from the point of creation, whereas the energy dashboard already has all the data I want.
the data is - as far as I know - not stored somewhere.
The energy dashboard will be calculated more dynamically.
There are two db tables - statistics & statistics short term.
“behind the scenes” HA is calculating the short term statistics and the long term statistics based on the values it receives from the configured sensors.
The Data you are seeing in the energy dashboard does come from these two tables and will be shown dynamically.
So - other than a utility meter, there is no specific state / value where the data for each sensor / day / week etc. will be stored.
If you want to do your own calculations, in my opinion the only way is a dedicated utility_meter which you can setup with the parameters you need especially for your case.
That’s the way how I do it, too in several areas.