Accumulating energy use over time

The iotawatt accumulated sensors were removed in 2023.2, and I used those to know how much energy some of my devices had been using ever since they entered service.

Now the iotatt energy sensor reset a midnight which is an absolute pain.

So:
What would be the easiest way to make an energy sensor that is made of the accumulation of another that reset daily.

without me having to write some python that is.

Thanks

No need for the Riemann Sum to convert power to energy, you still have energy sensors. Just use utility meters with no cycle specified (so they don’t reset). Even if the source energy sensors reset daily the utility meters will still keep counting up.

Use iotawatt integrator.
https://docs.iotawatt.com/en/master/integrators.html

1 Like

So I used a utility meter, with no cycle set; and created a template sensor to add the start value to display.

No need for a template sensor. There’s a service to calibrate the utility meter to any value:

https://www.home-assistant.io/integrations/utility_meter/#service-utility_metercalibrate

You can run this in Developer Tools → Services.

Also see blottootto’s reply, you may not need the utility meter.

I tried setting the value that way. But a minute later it reset to the previous value of the source

Did you use the calibrate service in Developer Tools → Services, or did you try to change the value in Developer Tools → States?