Reset counter value but remember its history

I have created a simple counter, that counts number of washing cycles based on power cosumption. This is straightforward.

However what trigger shall I use to reset at midnight of the last day of each month?

Is it possible to store value before reset so I can look back into history and see how many cycles happened in each month?

Thanks for help.

Not 100% sure if this works as never tried but you could keep the counter and add a utility meter on top with monthly cycle, the counter will just continue to increase

You mean utility meter that will track the counter? Is this possible?

How to look back into history on utility meter?

I suggest you try it out by setting up both a weekly and a monthly so you can see if it does what you want
The below is an example of a UM on a input_text helper counting m3 gas, where I wanted a daily view. The state is reset each night and the other one is the sum
image

Interesting idea, I am going to look into it.

Can you keep history somehow? Look back how many cycles happened in each month?

It goes into long term statistics

And where can I find that?

Here is an example of what I can see, my recorder purges at 10d but it continues to show the UM


44 days ago I started this UM

But it just shows increasing total usage of gas, can you also see usage on monthly basis?

As demonstrated…it resets daily, just try it out cannot hurt