I have a question about a temperature time-series data.
I have a temperature sensor which is connected to Home-Assistant.
Prometheus scrapes the data from Home-Assistant, which I then want to plot using Grafana.
My problem with this setup is:
The sensor updates its temperature values when a new temperature is recorded. New sensor data are only available every 1–2 hours, sometimes it can take 10 hours until the temperature changes enough for a new reading.
Prometheus scrapes the data from Home-Assistant every 60s, so there are lots of timestamps where the recorded temperature is exactly the same as in the previous timestamp. The temporal accuracy of that time series is higher than the real data is available.
The issue with those fake temperature values arise when I try plotting them using Grafana.
For a long time it plots the timestamps with the same temperature and then the temperature rises immediately in 60s. It looks very blocky (see link at the bottom for an example). I know, that is exactly how the data are, but in reality the temperature just rises slowly and that is what I want to show in Grafana.
Because the update time of the sensor varies with the change in temperature, I am not sure if I can write a better scraper for that. Is it possible to filter this filler data already in the scraper, or is there a good PromQL query to skip the filler data? Or would I need to push the data for the exact reading times to Prometheus instead?
I already asked about this issue in the Grafana community forum too, with a lot of screenshots.