Remove a glitched day from Energy?

Hi, for some reason energy consumption was negative yesterday (I do NOT have any Return to grid sensor/device set up as we do not have any).

It reports -1,5 MWh for yesterday. The total average consumption of our household is ~2,5 MWh per year.


How can I remove this erroneous data so it doesn’t mess up the stats? Is there a different way than to restore an older backup?

Thanks.

Developer Tools → Statistics, click on the ramp icon to the right of your entity. Navigate to the time the glitch occurred (or try the outliers button). Replace the erroneous value(s) with an average of the values either side.

Then work out why it happened to prevent it happening again. If it is a template sensor read this: Why an availability template is important for energy template sensors

Also in that pop-up more-info card showing the graph click the “Show More” link and zoom in to around 4am. The more info card graph tends to hide glitches in 5 minute statistics (which is what it plots). Though it does appear to show a discontinuity:

The history panel (“Show More”) shows actual state data.

1 Like

Thank you, super useful info! First time that sensor glitched like this. It’s not a template sensor, it’s a Frient Zigbee energy meter

You might want to report that to them.