Why can’t I get rid of bad sensor data?

Thanks, this post saved me a lot of time!

It would be great to see an easy option

One sudden spike throws out the data:

If theres no edit option, then unless you are some sort of database god, it seems like there is no option to fix the data?

5 Likes

I have the same problem and it is annoying as it throws out all calculations

3 Likes

In the process of migrating from Domoticz and although HA is easier and more intuitive than domoticz the latter had a great gimmick: In the graph you could click on an invalid point while holding shift and domoticz would ask if you would like to delete that specific point :slight_smile:
Is there a uservote / functionality request option for HA?

5 Likes

This kind of functionality would be great.
My Energy-Dashboard is totally worthless for this year due to wrong statistic date I can’t remove.
Unbelievable that this discussion started one year ago… :frowning:

2 Likes

I made myself a Node-Red flow to automatically detect and delete those bad values.
But not from the internal Sqlite db, as I use InfluxDB and Grafana for energy dashboarding.

Nonetheless: Maybe it helps someone to create a similar solution for his needs instead of manually deleting bad Zwave values every few weeks from his history. :wink:

Same thing for me unfortunately :frowning:

I need to delete data from my freeze sensor because it was kept out of it for a few hours…

Today, my DSMR gas sensor apparently had a hiccup; it reported 0 m3 for a minute or so. Now, today’s gas consumption is way off (I think it exceeds Tata Steel daily consumption).

Since this is not a ‘statistic’, it seems like this is an unrecoverable error? There is no way to remove a faulty data point that I could find.

I sorely miss this functionality (as well as being able to mass-delete non-existent devices)

Is there perhaps an add-on that would allow me to repair the data?

Thanks!

2 Likes

I also need this feature, e.g. to fix the pool water temperature of 284.05°C:

2 Likes

I had to remove this value manually in the following way: I searched with the tool DB Browser (SQLite) for the faulty value (“284.05”) in the STATES database and noted down the state_id. Then, I deleted this single value with DELETE FROM "states" WHERE state_id='1278727'; and the chart looks properly again:

1 Like

Just discovered HA’s long term stats existed today after I saw the 2023.12 posting that talks about them. Unfortunately I also found today that most of my sensors collected outliers over the last year or so, which renders the long term stats totally useless, see for instance

I looked into a random sample of 12 sensors (all of which have outliers) and not a single one of them shows the “fix” icon described above, supposed to be in Development Tools > Statistics list. Not sure what is the criteria but these are all sensors from standard temp / humidity / etc zwave devices.

We really need a feature in the History Graph so that we can click on the outlier point (which is always easy) and then be offered the option to “Delete this point”. Without this, long term stats have been useless every time I tried to use them.

Edit: it would also be useful to have a “reset sensor stats” type button to target all data or a specific period of data, for a specific sensor.

1 Like

Please create a feature request if you have feature requests. The month of WTH ended 14 months ago.

1 Like

I have the same problem (needing to delete some bad data) and seeing no “ramp” icon by the “Developer tools” / “STASTISTICS” for the temperature sensor in question. Can someone point me at the correct tools to use for this correction?

1 Like

Same problem here, I would think that if you exclude entities in the recorder, this means you’re not interested in them, they should be deleted from the db and no longer showing as an unfixable error in the dev tools / statistics view.

1 Like

I have a similar problem, it is with the energy dashboard, on the right side of the graph you can see a large spike, obscuring the normal data. I can’t find where this data can be removed from the sql database, perhaps I could if I look long and hard and still find it, but since this spike is so visible and I can mouse to it and see data when I hover over it, wouldn’t it be great if you get the option to remove the datapoint if it’s wrong?

1 Like

Look at the colour of that bar: it’s orange, which mean it’s your PV sensor. Go to dev tools > statistics. Find the sensor you configured for PV and click on the trend icon on the right. Etc.

thanks, that worked (though my suggestion still seems like an improvement :wink: )
I fixed it, like you said, lookup the sensor name in the energy configuration, go to developer tools, then the statistics tab and search for the sensor name (or a significant part of the name) and then click on outliers, find the one(s) that are wrong and adjust (I just entered “0”, which is mostly safe in case of 5 min solar production)

Would be veeeeery great.

Yes, I’m not seeing it on an MiScale https://www.home-assistant.io/integrations/xiaomi_ble which has saved some bogus values.

I have kind of similar situation. The HA records the when HVAC, Pump etc turn on and when it turned off so I can see for how many hours that device was on. Sometime that device integration disconnect or whatever and the device shown in ON state even when in reality I turned it off because integration failed to work (and needed reload) or it has gone offline. The extra times is in HA which I want to remove but it need ids to be found out and rows to be deleted in careful manners. Not an pretty situation.