SMA solar sensor.pv_gen_meter showing inconsistent data

Hi all,

Due to some renovations, my SMA inverters (I have 2) have been offline for a few weeks.
Upon reconnecting them, their ‘sensor.pv_gen_meter’ values showed a large negative spike (8 Dec).
A few days later, 15 Dec), there was an even larger positive spike.
Needless to day, this is completely messing up my energy stats.

If the problem would reoccur, I will log an issue for the integration, but right now, I am still in the assumption that it is just something weird happening because they have been offline.
My question is thus: how do I correct these outlier values without screwing up any of my other historical data?

Thanks!

Turns out it was not the inverters that are the problem. This is a bug that is for instance reported here.
A script to fix the history pending a permanent resolution can be found here.