How do I delete some of a sensors history?

I have several zooz outlets that control things.
One of those outlets appears to have had a stroke a day or so ago and somehow reported that the thing plugged into it used over a million watts:

while i find it amusing, its screwing up my graph, because the spike is so tall it makes everything else vanish.

I want to keep the sensor history, but i just need to delete this one bizarro entry. Is there a straightforward way to do that?

If you go to Developer Tools | Statistics and search for the sensor which had a funny turn, you may be able to edit its long term statistics and fix your graph (click on the icon on the extreme right). The sensor’s history will disappear in a few days anyway (default 10, but it depends on your configuration).

Sadly the statistic section in dev tools doesnt give me any ‘editing’ options for that sensor at all. It looks like the only way is to manually edit the db, and I was hoping to avoid that.

Ive installed sqliteweb and started trying to investigate, but its murky and unclear.
I don’t suppose anyone out there has a howto for this?
im guessing its going to be a case of querying one table to get an ID for a sensor, then querying another table using that ID to find all its entries, then finding and deleting the errant one, but I havent quite pinned down which tables are the ones im after

I think i’ve figtured out how to find the sensor, by identifying its metadata_id and then searching for that id in various other tables, but no matter where I look, I can’t find the over-a-million value anywhere. i can’t tell if this is something thats being compounded somewhere else and that raw value isnt in the db at all or what.

Old thread but I found an option to adjust these single records, maybe it was added to HA later.

Developer Tools → Statistics

1 Like