Hi, I am using influxdb as a backend and have 2 charts that are not showing correctly.
In one case I only get a value of 1 infrequently, while I would like the default to still show as zero. However the chart shows “no data” for the period selected if there hasn’t been data.
The other scenario is I have a temperature that is only populated into the database when it changes, in my case I get “no data” or gaps in the graph for the period where the temperature stayed the same.
Here are the queries:
SELECT count(“value”) FROM “binary_sensor.front_door_contact” WHERE time >= now() - 6h GROUP BY time(15s) fill(0)
SELECT moving_average(mean(“value”), 20) FROM “°C” WHERE (“entity_id” = ‘presence_sensor_temperature_measurement’) AND time >= now() - 6h GROUP BY time(15s) fill(previous)
As you can see, I have set the “fill(previous)” on the second query, but it can still show gaps.
Here are the graphs