How to create a new entities that represent the amount of energy(kwh) daily based on the instant energy consumed


I’ve several entities from my enphase envoy that provide me the instant power production/consumption/export/import in kw.

I would like to create a entity that integrate this value daily, monthly and yearly, in order to compare the production/consumption/export/import between the different month/days/years.

How would you achieve that? I’m open to have intermediary entities if it helps.

I’ve tried to use “utility” meter, but it doesn’t integrate. And if I use the Riemann sum integral sensor, it doesn’t reset daily.

The Powercalc integration can often add those sensors

You need to use both.

To convert power to energy use the Riemann Sum integration:

Make sure to read this section to minimise approximation errors: Nine times out of ten the best method is left however the default (if you specify nothing) is trapezoidal. So beware.

Once you have your energy sensors you can then feed these to utility meter helpers with whatever reset cycle you want: