Hello community members,
I’m facing a configuration issue with setting up an MQTT switch in Home Assistant and I’m hoping to get some assistance from you all.
I have meticulously followed the official documentation to configure the MQTT switch, but I’m encountering an error that I’ve been unable to resolve. I’ve checked and rechecked my configuration multiple times, and it appears to align with the requirements provided in the documentation.
Here’s the relevant section from my configuration.yaml
:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
influxdb:
host: 192.168.178.44
port: 8086
database: openhab_db
username: grafana
password: xxx
mqtt:
switch:
- name: "Virtual Bathroom Switch"
unique_id: virtual_switch_bathroom
state_topic: "tele/shelly_badetimmer_decke_D4FB9F/SENSOR"
availability_topic: "tele/shelly_badetimmer_decke_D4FB9F/LWT"
state_on: "ON"
state_off: "OFF"
qos: 0
retain: true
value_template: "{{ value_json.Switch1 }}"
However, despite my efforts, I’m consistently encountering the following errors:
Logger: homeassistant.components.homeassistant
The system cannot restart because the configuration is not valid: Error loading /config/configuration.yaml: mapping values are not allowed here in "/config/configuration.yaml", line 21, column 9
Logger: homeassistant.components.websocket_api.http.connection
[2789329968] The system cannot restart because the configuration is not valid: Error loading /config/configuration.yaml: mapping values are not allowed here in "/config/configuration.yaml", line 21, column 9
I’m puzzled by this situation as I believe I’ve adhered to the provided documentation. Could someone kindly review my configuration and offer any insights or suggestions on what might be causing these errors?