Energy integral shows negative since updating yesterday

I have an integral sum sensor for my old inverter which I don’t use anymore. However, I still want to keep it for yearly statistics and comparisons. Since yesterday, it shows up with a negative value (-1685kWh), after I updated to the latest stable HA core. Not sure what the deal is.

The strange thing, might be related, is that from 5 Oct until 16th October it shows no data. If I extend the start interval further in the past, the line is continous. I think this might be a clue.

Ypu can fix here, but cannot tell you what is the reason

1 Like

That’s really cool!
Unfortunately I don’t have any outliers, I just don’t have data (anymore?) from 5 Oct to 16 Oct. That shouldn’t mess things up since the integral should remain at the old value. For the other days, including today, I have the datapoints at 0kWh.

I just used the SQLite browser addon to find where the data is, identified the id and ran this: SELECT datetime(start_ts,'unixepoch') as dt,* FROM "statistics" where metadata_id=6 order by dt desc. It identified a few entries with zero which probably should not be there:

I think I will delete them, wish me luck :slight_smile:

EDIT: ran delete FROM "statistics" where metadata_id=6 and start_ts>=1729062000.0 since those were the ones off and it seemed to have ‘fixed’ the issue. Will see tomorrow if it persists or some other action needs to be taken.