Possible to correct history? Remove one false reading

I wonder if it is possible to edit the history of a sensor to remove a false reading. My cumulative electricity import got a spike down to 0 a few days ago and now the energy integration is showing a consumption of the whole current reading on the meter (~7500kWh). This would be nice to correct. Also my long term data in influx of course has this error.
The influx part I’m sure I can google my way to but what about the energy integration and the recorder in HA. I’m using mariadb. Is there something I can do to correct this? What I’ve found online is only how to purge the whole sensor history which is not what I would want here.

Developer Tools → Statistics. Click on the ramp icon to the right of your sensor. Find the time the glitch occurred and correct it.

Which integration is supplying this energy sensor?

It may be able to be corrected to prevent this occurring again.

1 Like

you are a saviour! I did not know that it was this easy. The integration is esphome. I’m using an esp8266 connected to the meters HAN/P1 port. Do you know how this affects the existing data in influx, if it will also be corrected?

No InfluxDB will not be corrected. That is a completely seperate database. You can delete measurements using the method here:

You need to work out why your ESPHome device reported 0 instead of unavailable.

Thanks again. The history is now fixed in MariaDB and I will look at influx next.
Yeah it’s strange. First time in over a year since I installed this device. Could have been related to a recent update and reboot but this has never been an issue before. Will keep an eye out for this but hopefully it was a one off.