Problem with statistics

Hello,

I had my home built P1 interface disconnected for some days and then I connected my new Slimmelezer. I uploaded the same code as my old device used to the Slimmelezer before connecting it. I had to fiddle with the device under devices to get it to work, update encryption key for example.
I also think I had to remove the old device and re-add the new one.
The result of this exercise is that my statistics are wrong now, I got -27000KWh that hour.


The problem is shown with this SQL Query that filters out the two id’s where device was disconnected and reconnected:

SELECT *
FROM "statistics"
WHERE metadata_id = 48  AND (id = 1807775 OR id = 1876080)

Result of query:

[
  {
    "id": 1807775,
    "created": null,
    "metadata_id": 48,
    "start": null,
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 41610.332,
    "sum": 27210.222,
    "created_ts": 1689260410.7797816,
    "start_ts": 1689256800.0,
    "last_reset_ts": null
  },
  {
    "id": 1876080,
    "created": null,
    "metadata_id": 48,
    "start": null,
    "mean": null,
    "min": null,
    "max": null,
    "last_reset": null,
    "state": 41958.117,
    "sum": 0.12099999999918509,
    "created_ts": 1690743611.2652175,
    "start_ts": 1690740000.0,
    "last_reset_ts": null
  }
]

The sum is reset for some reason, probably correct and a direct result of my attempts to get the new Slimmelezer to successfully replace my home built one.

Can this be corrected somehow?
I would like to get the statistics correct again…

Thanks in advance!

Have you looked in Developer Tools | Statistics?

Yes, first place I went to, I can’t find any value that hour that is in this size.

And it is a very big negative number. So now it looks like I have exported a lot of energy.

Is it possible to change the sum value back?

same here

I am wondering why nobody is watching this bug