Reuse sensor/statistic from Energy Dashboard

I would like to reuse the data from my Energy Dashboard e.g. for another UI.

I have a Fronius integration in the Energy Dashboard. However, I do not find the statistics data as a sensor.
Such as daily grid consumption or self-consumption. Does the Energy Dashboard create the values ​​directly in the database? Can I use the values ​​somehow or do I have to build my own sensors statistic sensors?

Example today:
grid_consumption 1,7 kWh
and overall consumption 3 kWh

Bildschirmfoto 2023-08-26 um 11.47.49

Thanks

https://community.home-assistant.io/t/using-values-of-energy-management-in-dashboards/337876

1 Like

Uhhh looks old the issue thanks

Yes the feature request has been up for a while. There is a suggestion for a workaround in there - an SQL sensor.

Yes there are two suggestion: SQL Sensor or own utility meter.
I couldn’t figure out which variant is better.

@tom_l Is this the source code for the energy dashboard. https://github.com/home-assistant/core/blob/dev/homeassistant/components/energy/sensor.py?

I would like to look how they calculate the raw data from the database.