Statistics sum, suddenly very large value

I have a sensor for total production of electricity from my Goodwe inverter. This has worked well for 2 years. Now I have a problem with really strange values, see this extract from the statistics table:

|state  |sum               |
+-------+------------------+
|28869.4|14549804.600000465|
|28869.2|14549804.400000466|
|28868.9|14549804.100000467|
|28868.2| 14549803.40000047|
|28865.9|14549801.100000475|
|28861.5|14549796.700000469|
|28855.1| 14549790.30000047|
|28847.2|14549782.400000477|
|28838.2|14549773.400000477|
|28828.3|           28828.3|
|28819.2|           28819.2|
|28810.7|           28810.7|
|28802.3|           28802.3|
|28796.4|           28796.4|

I’ve tried to fix this by setting the sum to the value of state (I don’t this is correct but it is good enough for me). BUT, the big values always comes back after a statistics run.

What is happening here, and what can I do about it? Set one row to a big negative value?

Do not manipulate the statistics data tables directly.

Go to Developer Tools → Statistics. Click the ramp icon next to your entity. Find the time the erroneous reading occurred and edit it there.

Also look at the history graph of the entity to see what happened.