ZHA config is not following device_config domain manual override

Hello Everyone,

I have one MHCOZY Zigbee single relay device and two MHCOZY double relay devices in my HA setup through ZHA. Everything works fine. However, all of them were detected as light instead of switch, and I would like them to be correctly declared. Following the documentation, I included the following lines in the config in order to change their domains:

zha:
  device_config:
    00:12:4b:00:23:b7:cb:09-1:
      type: "switch"
  device_config:
    00:12:4b:00:23:b7:cb:09-2:
      type: "switch"
  device_config:
    00:12:4b:00:22:6b:6b:54-1:
      type: "switch"
  device_config:
    00:12:4b:00:1c:d5:b5:bd-1:
      type: "switch"
  device_config:
    00:12:4b:00:1c:d5:b5:bd-2:
      type: "switch"

However, the first relay of the double relay device with address 00:12:4b:00:1c:d5:b5:bd (endpoint 1), which it’s the fourth device in the list, is the only that has changed its domain to switch. Rest of them remain as light. I think I am stating the endoints correctly, but I have not been able to make them change.

This is how the devices signature is displayed:

DEVICE 1 (TWO RELAYS)

{
  "node_descriptor": "NodeDescriptor(byte1=1, byte2=64, mac_capability_flags=142, manufacturer_code=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.Router: 1>, *user_descriptor_available=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "out_clusters": [
        "0x0000"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "out_clusters": [
        "0x0000"
      ]
    }
  },
  "manufacturer": "eWeLink",
  "model": "ZB-SW02",
  "class": "zigpy.device.Device"
}

DEVICE 2 (1 RELAY)

{
  "node_descriptor": "NodeDescriptor(byte1=1, byte2=64, mac_capability_flags=142, manufacturer_code=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.Router: 1>, *user_descriptor_available=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "out_clusters": [
        "0x0000"
      ]
    }
  },
  "manufacturer": "eWeLink",
  "model": "ZB-SW01",
  "class": "zigpy.device.Device"
}

DEVICE 3 (TWO RELAYS)

{
  "node_descriptor": "NodeDescriptor(byte1=1, byte2=64, mac_capability_flags=142, manufacturer_code=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=0, maximum_outgoing_transfer_size=160, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.Router: 1>, *user_descriptor_available=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "out_clusters": [
        "0x0000"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0100",
      "in_clusters": [
        "0x0000",
        "0x0003",
        "0x0004",
        "0x0005",
        "0x0006"
      ],
      "out_clusters": [
        "0x0000"
      ]
    }
  },
  "manufacturer": "eWeLink",
  "model": "ZB-SW02",
  "class": "zigpy.device.Device"
}

Any help on this, please, so I can change the domain of the 4 remaining from light to switch?

Solved. It was as simple as removing all device_config lines except the first one:

zha:
  device_config:
    00:12:4b:00:23:b7:cb:09-1:
      type: "switch"
    00:12:4b:00:23:b7:cb:09-2:
      type: "switch"
    00:12:4b:00:22:6b:6b:54-1:
      type: "switch"
    00:12:4b:00:1c:d5:b5:bd-1:
      type: "switch"
    00:12:4b:00:1c:d5:b5:bd-2:
      type: "switch"