How to fix Energy panel reports after some sensor spikes broke it?

I recently changed switched the way I computed my energy metering sensor, and that worked well however since it was depending on a zigbee device reporting and I didn’t properly set an availability , I’m now with an energy computation that is broken:

Indeed I contributed alone to reduce lots of CO2 emissions, just because I was forgetting a configuration parameter, it seems :joy_cat:.

Now, this was due to the sensor having some invalid values (I think, going from ~40kWh to ~5kWh at some frequents reboots I did). However, I removed those values from the sqlite db.

And now the sensor graph is clean (almost, except that due to a bug it didn’t report by night), but still I’m missing all its reports from yesterday at around 17.30 (and there’s nothing about it today).

image

Plus, as you can see the value of energy used is wrong… How can I make home-assistant to fix this or cleanup the DB in order to get the device values recomputed?

I’ve tried to remove and add it again to the energy configuration but it didn’t help much (not sure if I should wait more than few minutes though).

Did you find any solution to this?

Nope, actually after the last spike my energy computation is just broken.

At first I tried to find the database entry, but then I found this in another topic:

It was really easy :smiley: