Wrong config of switch, device-tracker, script

Hi, my configuration.yaml file looks like this:

      - platform: mqtt
        name: "Kitchen"
        command_topic: "homeassistant/switch1" 
        payload_on: "ON"   
        payload_off: "OFF" 
        optimistic: true   
        qos: 0
        retain: true
        value_template: '{{ value.x }}'

(I have 2 spaces before start of every new line, but I dont know ho to do it here…)
But Home Assistant is notifying me, that this config is wrong and can’t be set up. I dont know why. Please can you help me?

Use the icon shown by the arrow at the top of this page to permit preformatted text like this:

line 1
   line 2
     indented further
   back out

You may very well have an indentation issue.

1 Like