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)?
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.
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.