How to fix certain devices going into negative on energy dashboard

I have a couple Zigbee plugs that seem to persist the total energy consumption once a day, so if there is a power outage, they go negative on the energy dashboard. How can I tell the energy dashboard that certain devices should only go up and if they go down, treat it as if it stayed the same? So if it goes from 3 → 4 → 2 → 3 in an hour, the displayed consumption should be 2 and not 0.

It seems like a “periodically resetting” utility meter helper does exactly what I want