Control single light from multiple switches

Hi,

I’m using Zigbee2MQTT to control my zigbee devices. Most of them are Aqara switches.
I have some lights that I want to control by 2 (or in one case 3) switches and have their on/off status synchronized. In each case one of them is electrically connected to the lights, and the other one is a “dummy”. I’ve tried using the Synchronize States blueprint (because I want their state to be the same), but after working well for some time it stopped, causing a disco effect ( lights turning on and off once, or a few times) instead of one following another state. I though a Zigbee group is a way to go - and using one from HA GUI works really well - but I don’t know to achieve the same when pressing physical switch. How can I make it so when I press either of the switches, it turns the other one (and in one case the other two) into same status (on/off)?

Does this thread help?

Probably something as simple as this could help, if I correctly understood your issue.

description: ""
mode: single
trigger:
  - platform: state
    entity_id:
      - switch.your_switch_1
      - switch.your_switch_2
      - switch.your_switch_3
    from:
      - "on"
      - "off"
    to: 
      - "on"
      - "off"
condition: []
action:
  - service: light.toggle
    data: {}
    target:
      entity_id: light.your_light

And if you have multiple lights where you want to keep the states sync you can create a group either in your Zigbee controller or in the Helpers in Home Assistant and that will result in a new light entity representing the group of lights. Use that new entity in your automations and your lights will be synced.

I’ve since found a Blueprint automation that handles this better - doesn’t give me a disco effect, but sometimes fails to synchronize the state, which is still better IMO. However whatever delay these automations introduce seems to introduce issues, so I’d like to use the Zigbee groups if somehow possible. They execute in perfect sync when ran from HA or via HomeKit bridge on my phone. Is there a way to set up switches to directly trigger these? I’d rather do it directly in zigbee2mqtt, rather than going trough HA layer.

From Zigbee2mqtt docs:

Groups: Groups | Zigbee2MQTT
Binding: Binding | Zigbee2MQTT
Binding a remote to a group: Binding | Zigbee2MQTT

Have you looked at those already?

Yes, I did.

Hi, Any luck with this? I also have aqara switches and I have noticed they will not work with binding.

No. I’m using a clunky automation that syncs states of two devices. Most of the time it works, sometimes it’s lagging.

I use two automation’s for turning on/off light from multiple switches. Certainly it could be one automation but this is working without issue in my case

alias: Entrance lights on
description: ""
trigger:
  - platform: state
    entity_id:
      - light.entrance_hall_light
      - light.entrance_hall_slave_light
    from: "off"
    to: "on"
condition: []
action:
  - service: light.turn_on
    data: {}
    target:
      entity_id: light.entrance_hall_light_2
mode: single
max_exceeded: silent

and second

alias: Entrance lights off
description: ""
trigger:
  - platform: state
    entity_id:
      - light.entrance_hall_light
      - light.entrance_hall_slave_light
    from: "on"
    to: "off"
condition: []
action:
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.entrance_hall_light_2
mode: single
max_exceeded: silent

Those two are zigbee switches. I tried zigbee group and it doesn’t work in my case. I get the same problem as with tuya wifi switches, light came randomly on off.
I use helper to make light group for these switches.