Hi. I am tracking my weight with a sensor with state_class = measurement.
The problem, is the weight sensor only change when I weigh myself, so, I don’t weigh myself for a week, each hour save the last weight and the graph is a horizontal line to the last point that goes down sharply instead of being a descending line from the previous weight to the last one.
Any idea for only add new value to stats only when it changed?
That depends on your sensor/device. If neither state or attributes change between hours, nothing is recorded.
That would be a configuration on the graph itself, whatever you’re using.
In grafana, you have “last”, that will do what you currently see, and “linear”, that will do the linear interpolation you’re looking for.
Ah, actual statistics.
Yeah, those kind of aggregated statistics doesn’t fit the case of an infrequently changing value very well.
Nothing I see that could be done about that.