Set graph axis range on history graph?

I use the history graph quite a bit to track solar panel production and electricity usage for various devices in my home. However, I sometimes get erroneous data (e.g. wattage reading of +1M W) from my system. Not sure why, but it happens. When it does, the graph becomes useless since it is scaled to the 1M W range rather than the 0-500W range I typically need. Is there any way to remove out of range data from history or produce history graphs with a specific Y-axis range???

3 Likes

I may be wrong but I think the only way to remove spurious data is to delete it from the database (because that’s where the history graph is getting its data). Alternately, if the data is being received by a Template Sensor, you can enhance its template to reject ‘out of band’ data (and simply replace the spurious reading with the last-known value).

I see no options to control the Y-axis range in its documentation. Maybe there’s a custom card that offers more flexibility but I’m just guessing.

I believe the way others handle this situation is to use a completely different database (influxdb) and graphing renderer (Grafana). I’ve only looked at it briefly so I’ll defer to actual users to answer any questions you may have about it.

1 Like

You can use the range or outlier filter with the filter integration.

1 Like

I know this topic is quite old, but I would like to upvote as a feature request from the title.

Reason: scaling bias. It would be great to be able to configure history charts in a way that guarantees comparable scales among different graphs. The automatic scaling is good as a starting point or general purpose, but is very bad for comparing values among graphs.

5 Likes

Same here. I would LOVE to be able to set the axis range on history graph. Too often I get erroneous data that is way out of scale, and it ruins usefulness of the graph.

1 Like

In some cases I would like to see the bottom start at zero.

4 Likes

Here’s a potential fix

We’re in 2024 now, and since Home Assistant 2024.2 we finally got these options! min_y_axis max_y_axis

3 Likes