Mqtt switch and upgrade to latest hass, wrong behaviour

Hello,

last week I decided to upgrade to hass 2021.11.5. And I’m having some issues with mqtt switches[1].
The problem is that when I’m toggling one switch entity, all switches are toggled, and I’m lost to what is causing this behavior.
At the beginning I though it was my automation or some mistake under my blueprint, but testing with developers tools shows the same result[2]. Any help will be welcome

configuration.yaml

group: !include groups.yaml
automation: !include_dir_list automations
switch: !include switch.yaml
sensor: !include_dir_list sensors
script: !include scripts.yaml
scene: !include scenes.yaml
...

[1] switch.yaml

  - platform : mqtt
    name: "Watering System Back Yard"
    unique_id: back_yard_switch
    state_topic: "riego/jardin/POWER"
    command_topic: "riego/jardin/POWER"
    payload_on: "RELAY_1_ON"
    payload_off: "RELAY_1_OFF"
    optimistic: false
    retain: true
  - platform : mqtt
    name: watering_system_front_yard
    unique_id: front_yard_switch
    state_topic: "riego/jardin/POWER"
    command_topic: "riego/jardin/POWER"
    payload_on: "RELAY_1_ON"
    payload_off: "RELAY_1_OFF"
    optimistic: false
    retain: true
  - platform : mqtt
    name: watering_system_orchard
    unique_id: orchard_switch
    state_topic: "riego/jardin/POWER"
    command_topic: "riego/jardin/POWER"
    payload_on: "RELAY_1_ON"
    payload_off: "RELAY_1_OFF"
    optimistic: false
    retain: true

[2]

It is quit obvious: they all listen to the same mqtt topic.

Use unique mqtt topics for each switch.

Hi @francisp,

thanks for the help, indeed this was working on previous version using the same command topic.
I just realized that seems that when I split the config, I did a copy&paste mistake with payload_on / off.
When changing each payload to a unique one, behavior is as expected again.
e.g. payload_on: “RELAY_1_ON”, payload_on: “RELAY_2_ON” , payload_on: “RELAY_3_ON”

Thanks for your time.