Energy: Clean up faulty data energy production

Hi,
I have configured a smart plug to measure the power generation of my small solar panels.
Something went wrong a couple of weeks ago and now I have a negative value in the monthly energy overview - see screenshot: 7th Feb -11.64kWh.

I have already tried a couple of things to correct the data directly in the DB, but was not successful yet.


I believe it is related to the gap in the sum (red arrows in the screenshot). I tried to play around with id 19001 (last_reset…) but nothing changed.

Do you have any idea how I can get rid off the negative value?

Thanks for your help!

You should also fix your sensor that is causing this so it does not happen again.

Thanks a lot for the quick reply!
If I would update the previous sums (before I saw the negative value) and would deduct the 11.64kWh, wouldn’t that mess up my overall statistics?
I would rather prefer adding the 11.64 to the sum values after I saw the negative value, but I saw in your other post that this will just move the spike to today.