Adding a second sonoff to configuration.yaml causing mapping values error

Hello. I added a sonoff tasmota switch to my configuration.yaml. It works fine, except I have now added a second one. The second one has caused mapping values are not allowed here
in “/config/configuration.yaml”, line 35, column 9 which is where the first sonoff name is. Here is what I have in my configuration.yaml:

switch:
   -platform: mqtt
    name: "Sonoff Switch 01"
    command_topic: "cmnd/sonoff/POWER"
    state_topic: "stat/sonoff/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
   -platform: mqtt
    name: "Sonoff Switch 02"
    command_topic: "cmnd/sonoff1/POWER"
    state_topic: "stat/sonoff1/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

It is very difficult to try to help if you don’t keep your configuration formatted properly.

Please use ‘Preformatted text’ button in the toolbar (sixth from left).

Try the following instead:

switch:
  - platform: mqtt
    name: "Sonoff Switch 01"
    command_topic: "cmnd/sonoff/POWER"
    state_topic: "stat/sonoff/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true
  - platform: mqtt
    name: "Sonoff Switch 02"
    command_topic: "cmnd/sonoff1/POWER"
    state_topic: "stat/sonoff1/POWER"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

Please let us know how it goes.