Aggregate values

Hi, i would like to have the values aggregate among the day. Currently i get in certain undefined period new values, which look like this:


Instead i want to have a growing graph, so on timelime it would be first value is current.value, second value is first.value + current.value and so on. Any ideas, how to do that?

I suspect what you really want is to convert power (W) to energy (Wh). For this you need to calculate the area under the graph, not just add the values. Fortunately this is very easy with this integration:

As your device switches on and off quickly, make sure you specify method: left to reduce approximation errors. There’s a section about selecting the right method in the documentation linked above.

1 Like