How to correct/discard Growatt data when using second hand inverter?

Hello,

First time poster, happy user of HA here.

I have been using the Growatt integration for a while with 2 installed inverters which I have from the start.
Now I have bought a second hand inverter and after starting to use it, today it shows a solar production of 3383 kW which is incorrect, however, that is the value of the counter on the Growatt inverter.

To correct this I have tried to check the database (using MySQL) and I found that under Statistics with Metadata_ID 77 the total values for Growatt for my setup are saved.

First attempt to solve it, I have changed the data from the latest entry hoping the next entry would take this value as base for the SUM field.
Unfortunately this failed.

My second attempt was to change the first occurance of data from this metadata_id to a higher value, which yielded no results as well.

So now I have this problem that my energy consumption for today looks like this:

Does anybody have an idea which data I need to manipulate to correct this permanently?
I expect that there is another table which contains the starting value for my Growatt installation which is used to calculate the sum with every new entry.
Unfortunately I have not found it yet.

Thank you very much in advance for your help!

I will post the reply here for anybody running into the same issue.

I had only changed the entries in table statistics.
After simultaneously changing the table statistics_short_term the problem was solved.

In my case I use an external MySQL database which made it easy for my to manipulate the data.

In addition to solving this specific issue, I was able to load historical data for my Solar, Gas and Utility meter into the database.

I had a similar issue when I added a second-hand inverter I picked up at a flea market Sacramento. It showed some weird solar production numbers, just like you’re experiencing.

What worked for me was a bit of manual intervention. I had to go into the Growatt integration settings and do a hard reset of the values. After that, I adjusted the data manually in the database to sync up with the new inverter’s readings.

Make sure to back up your data before making changes, just in case. This approach helped me get accurate readings again.