Resetting initial energy statistic

I have a number of devices that monitor energy/power (smart sockets and a grid clamp meter). I’ve been using this to graph and monitor power use for some time now.

A few days ago I decided to look at the energy dashboard… simple to set up, and a nice display!

My devices all maintain kWh, so I used that value (seemed obvious), and the hourly and daily stats seems fine.

However, the first day shows that I used 9000 kWh from the grid (my energy_source), presumably because of the initial values already recorded in the grid monitor, and maybe I selected the wrong entity, then fixed it. The upshot though is that day then dwarfs the real data, making the weekly, monthly graphs unusable.

While I considered removing the dashboard and re-doing it, I assume that the statistics are in the database and will survive.

Is there some way of removing this initial value so that the rest looks more sane…

If there’s no easier way, I’d be happy to modify the database, but I just need to know which tables need adjusting, as I see there are 4 stats related table…

Anyone else had this problem and know of a fix?

Thanks

Yes. Go to Developer Tools → Statistics and find the entity with the incorrect value(s). Click the ramp icon to the right of it. Find the time the bad value(s) occurred and change it/them to an average of the good values before and after it.

As simple as that! Thanks. I just had to set the whacky value to 0 to get it started.

I vaguely remember that feature being added, but never needed/used it before, so clearly forgot about it :slight_smile: Next time I shall remember, as it is better than hacking the database

Cheers