MQTT Switch 8 channel is not showing up

Hello, I’m trying to configure an 8-channel relay module via MQTT. The module has already communicated with Home Assistant, but it doesn’t appear in the entities.
Below is the yaml code placed in configuration.yaml

Can someone help me?

mqtt:

  • switch:
    • name: “Molsmart Switch-1”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch1/state”
      command_topic: “home/molsmart/switch1/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true
    • name: “Molsmart Switch-2”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch2/state”
      command_topic: “home/molsmart/switch2/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true
    • name: “Molsmart Switch-3”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch3/state”
      command_topic: “home/molsmart/switch3/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true
    • name: “Molsmart Switch-4”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch4/state”
      command_topic: “home/molsmart/switch4/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true
    • name: “Molsmart Switch-5”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch5/state”
      command_topic: “home/molsmart/switch5/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true
    • name: “Molsmart Switch-6”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch6/state”
      command_topic: “home/molsmart/switch6/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true
    • name: “Molsmart Switch-7”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch7/state”
      command_topic: “home/molsmart/switch7/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true
    • name: “Molsmart Switch-8”
      unique_id: molsmart-relay9365384
      state_topic: “home/molsmart/switch8/state”
      command_topic: “home/molsmart/switch8/set”
      payload_on: “ON”
      payload_off: “OFF”
      state_on: “ON”
      state_off: “OFF”
      optimistic: false
      qos: 0
      retain: true

The code above has markers, but it was only when pasting it here. In the system it is correct with -

Like this:

mqtt:
  switch:
    - name: etc...

Not:

mqtt:
  - switch:
      - name: etc...

Please don’t post pictures of text, in future use the </> button on the post toolbar (sometimes found under the cog menu) or do this: https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16