Question regarding InfluxDB

Hi folks,

my setup shows me a behaviour I did not expect :wink: So I hope someone can point me to the right direction. That’s what I did:

I configured my Netatmo Healthy Home Coach to write it’s data to a MQTT broker. So I get entries on this side like these:

mytopic/NHC_CO2 1240
mytopic/NHC_SignalStrength 3

On HA-Side, I created mqtt sensors:

- platform: mqtt
  name: "Netatmo CO2"
  unit_of_measurement: "ppm"
  icon: mdi:periodic-table-co2
  state_topic: "mytopic/NHC_CO2"

- platform: mqtt
  name: "Netatmo Signalstärke"
  icon: mdi:signal
  state_topic: "mytopic/NHC_SignalStrength"

Fine; when MQTT receives updates, my sensors get updated accordingly.

Every entity state should go into my InfluxDB for visualizing with Grafana. So I’m using this not too fancy code in configuration.yaml to achieve this:

  host: ''
  port: '8086'
  database: 'mydb'
  username: 'myuser'
  password: 'mypassword'
  max_retries: 3
  default_measurement: state

Now my problem: as soon I define unit_of_measurement in my sensor’s config, this will be the measurement name used in InfluxDB. Means: I expected the CO2 values under sensor.netatmo_co2, but in fact they’re stored under the name ppm. But for sensor.netatmo_signalstarke everything is fine: it has no unit_of_measurement defined.
Same for temperature. Which means: all values with unit_of_measurement defined as °C go to InfluxDB measurement °C which means one weired graph with all temperatures from all rooms in it.

That’s not what I expected, and that’s not what I need. So my question is: what do I miss?

Using HA 0.88.1 (Hassbian on RPi 3); InfluxDB 1.7.4-1(on external server machine); mosquitto-1.5.6 (on external server machine) and appreciate every single hint :innocent:


Did you ever find a solution here? I have the same issue.

Hi @WeeBull,

nope, it’s still like this. I think this is treated als a feature, not als a bug :wink: But coming from the monitoring perspective (icinga2 etc.), this behaviour is really a bit strange…