One of my sensors returned some bad data, and those values are throwing off the vertical scale on the history graph, to the extent that the variations I’m interested in can’t be seen at all. The graph is of temperatures, and the bad data is -575F. So the difference between 68 and 72 is invisible.
Is there a way to remove those erroneous data points? The points are from a climate current_temperature attribute.
I’ve read through the linked thread, and I see that you must be talking about the icon with the little ramp with an arrow on it. My statistics page only shows that icon for the energy summation lines.
Here’s an example of how you can delete a bad reading with sql - in my case, it was an impossible value (65536) for the fan speed of my heat pump.
The sensor (sensor.heatpump_fan_cfm) doesn’t appear in the Statistics tab, so I had to go to the database itself. Here’s what I did (I’m running inside a Docker container, but I did the work outside the container).
> cd config/homeassistant # Go to the directory with my HA configuration, database, and logs. > sudo sqlite3 home-assistant_v2.db # Open the database; it’s owned by root, hence the sudo select * from states where state = 65535 and metadata_id = (select metadata_id from states_meta where entity_id = 'sensor.heatpump_fan_cfm'); # Make sure I’m getting the right entry to delete. delete from states where state = 65535 and metadata_id = (select metadata_id from states_meta where entity_id = 'sensor.heatpump_fan_cfm'); # Do the deed .quit # all done
The erroneous value was gone, and my history graphs were useful again.