HA InfluxDB is missing the zero values from sensors

Hi all,

This is my config for influxdb:

#--- InfluxDB ---
influxdb:
    host: localhost
    port: 8086
    database: homeAssistant
    username: ****
    password: ****
    max_retries: 3
    default_measurement: state
    include:
       domains:
        - sensor

It seems like HA is sending no zero values to influxdb.
I have several tasmota power plugs with power metering.
When the plug is switched off, influxdb is reporting no data and grafana can not show a graph or is showing graphs with wildly interpolated lines when instead there should be a line at zero.

Is there a way to report also the zero values to influxdb?

2 Likes

Hey,

same issue here. have you found any way to solve that?

Still no solution for this? Having the same issue.

Same here, I’m using Tasmota with a sonoff Pow. Even with

Data is not recorded to influx when the switch if off

SetOption21 is 1 and I confirmed in Tasmosta’s console that sensor data are sending when the Sonoff Pow is switched off

I hade the same issue today.
I have a query where I read different values and subtract them within the query.
But one column most of the time is empty and then my query does not bring a result.
I added this line to exchange every empty field with a 0

|> map(fn: (r) => ({ r with empty_column_name: if exists r.empty_column_name then r.empty_column_name else 0.0 }))