if you reset your total value each day you will have a problem showing your weekly/monthly/yearly values.
The assumption for this kind of usage is, that you have an energy Counter which is counting up without reset. If you reset the counter, you will get negative values for your weekly/monthly/yearly values which are indeed wrong in this situation.
I did not get the logic for resetting the counter and why you want to reset the counter.
You have energy meters which are:
- counting up
- overflow at 65556 (to start at 0 again)
- some of them you can reset manually
I would use two items for each energy meter:
- the actual value of the energy meter
- the sum/total of the energy meter
The first item represents the value you get from the counter. Via rule you update the second item from the first item with respect to overflows. Therefore your second item has the actual value since you started your measurement. So if your energy meter had the third Overflow, the second item should have a value around 196.668
Your reporting is done with the second item, which has no overflows and shows the real values for week/month/year.
With this Approach you don’t need any manual reset of the energy meters…