Can't see the buttons to remove statistics

Hi all!

I am having issues removing bad statistics (spikes in my graphs) and can’t get my head around it.

I’ve succeeded once removing directly from the DB (with ssh and sqlite, and thanks to this forum so full of great material, thanks!), but failed miserably in my next attempts. I am sure I will manage if I spend a few more hours, but if I have to do this for every time that I have a spike (e.g. every time I install a new sensor, before it falls into its final location) I will simply not do it. Please don’t bother recommending how to do this this way, there are plenty of forum threads about this already.

Luckily home assistant should have a relatively new feature that allows you to remove statistics by going into Debug → Statistics and clicking on the right graph icon on the right. The only problem is… that for some reason these graph icons do not show up for me! At the beginning I thought it was a problem of my installation, being a new feature and all… but last night I’ve seen that a new metric has the graph icon indeed, while all the other (important) ones do not have such graph icon. I did not do anything special when I added this sensor.

Does any of you know what might be going on? Why do some sensors have the icon to remove statistics and some (almost all, in my case) don’t? How can I enable the icon in those?

Thanks a lot for your help!

The ability to edit outliers is only available for entities with the state_class total or total_increasing, not measurement.

So things like energy or water consumption :white_check_mark:, but things like power or water flow rate :x:

Do not change your entity state_classes from measurement to total or total_increasing just so you can edit them there unless they actually are totals. That will not work. These classes have very specific requirements. See: Sensor Entity | Home Assistant Developer Docs

Your only option to edit these entities is database manipulation.

Wow, that was fast!
Do you happen to know the reason why you can only edit entries of the total* class? I would have expected the “coding problem” to be pretty similar.
Do you know about any plans to implement this on regular measurements? (just being lazy here… I’m just try to understand whether it’s worth for me to dive into the DB depths, or train my patience :slight_smile: … or whether diving into the depths of HA development -to implement a PR.
Thanks!

It was primarily developed to help people fix issues with the energy dashboard. No I don’t know of any plans to expand it.