Hey you all,
I need some help with MQTT: I have a voltcraft USB airquality sensoer connected to a R-Pi running Domoticz and I have this Domoticz configured to send it through MQTT:
I have Mosquito installed on a Different R-Pi and it sees my domoticz sensor:
The following I wanted to add to my configuration.yaml:
mqtt:
- name: "air_quality"
state_topic: "homeassistant/18/state"
unit_of_measurement: "ppm"
icon: "mdi:hvac"
value_template: "{{value_json.airquality}}"
#
I have it thus far that MQTT receives the mqtt message:
When reloading the YAML I get this as warning:
Configuratiewaarschuwingen
Invalid config for ‘mqtt’ at configuration.yaml, line 144: ‘name’ is an invalid option for ‘mqtt’, check: mqtt->0->name Invalid config for ‘mqtt’ at configuration.yaml, line 145: ‘state_topic’ is an invalid option for ‘mqtt’, check: mqtt->0->state_topic Invalid config for ‘mqtt’ at configuration.yaml, line 146: ‘unit_of_measurement’ is an invalid option for ‘mqtt’, check: mqtt->0->unit_of_measurement Invalid config for ‘mqtt’ at configuration.yaml, line 147: ‘icon’ is an invalid option for ‘mqtt’, check: mqtt->0->icon Invalid config for ‘mqtt’ at configuration.yaml, line 148: ‘value_template’ is an invalid option for ‘mqtt’, check: mqtt->0->value_template
What am I doing wrong here?
UPDATE: I changed the yaml to:
mqtt:
sensor:
- name: "air_quality"
state_topic: "homeassistant/18/state"
unit_of_measurement: "ppm"
icon: "mdi:hvac"
value_template: "{{value_json.airquality}}"
there are no errors anymore but I also am getting no readings, the entity remains unknown
can anyone helpo me with this?