Invalid config help with YAML

Hi All,

I’m trying to change my configuration.yaml ready for the MQTT changes in 2022.12.0.

I have removed my switch platform mqtt section and added:

mqtt:

  switch:

    - name: "Doorbell"

    - command_topic: "cmnd/rf-bridge/Backlog"

    - availability_topic: "tele/rf-bridge/LWT"

    - payload_available: "Online"

    - payload_not_available: "Offline"

    - state_topic: "tele/rf-bridge/RESULT"

    - value_template: '{{value_json.RfCode}}'

    - payload_on: "RfSync 12220; RfLow 440; RfHigh 1210; RfCode #AA B1 04 0140 0B86 03B6 0F78 381A08282A0A0A082A0A0A08282A0A0828282828282A0828282828 55"

    - payload_off: "RfSync 12220; RfLow 440; RfHigh 1210; RfCode #AA B1 04 0140 0B86 03B6 0F78 381A08282A0A0A082A0A0A08282A0A0828282828282A0828282828 55_off"

    - state_on: "#47D655"

    - state_off: "#47D655_off"

    - optimistic: true

    - retain: false

    - qos: 2

Now I get an error when rebooting:
‘The system cannot restart because the configuration is not valid: Invalid config for [mqtt]: required key not provided @ data[‘mqtt’][‘switch’][0][‘command_topic’]. Got None. (See /config/configuration.yaml’

It points to the line where I added mqtt:

Any clues or advice please?
Full config file here: # Configure a default setup of Home Assistant (frontend, api, etc)default_co - Pastebin.com

Apologies, further reading shows that I only need one - then all other lines should not have - but align with first as follows:

mqtt:

  switch:

    - name: "Doorbell"

      command_topic: "cmnd/rf-bridge/Backlog"

      availability_topic: "tele/rf-bridge/LWT"

      payload_available: "Online"

      payload_not_available: "Offline"

      state_topic: "tele/rf-bridge/RESULT"

      value_template: '{{value_json.RfCode}}'

      payload_on: "RfSync 12220; RfLow 440; RfHigh 1210; RfCode #AA B1 04 0140 0B86 03B6 0F78 381A08282A0A0A082A0A0A08282A0A0828282828282A0828282828 55"

      payload_off: "RfSync 12220; RfLow 440; RfHigh 1210; RfCode #AA B1 04 0140 0B86 03B6 0F78 381A08282A0A0A082A0A0A08282A0A0828282828282A0828282828 55_off"

      state_on: "#47D655"

      state_off: "#47D655_off"

      optimistic: true

      retain: false

      qos: 2

All working now.