Background:
Running Home Assistant, using ZHA, I have groups with smart downlights and 2-1 Zigbee switches all bound in groups and working well (smart bulbs entity in switches is on).
The switches are included in the group, and the switches are bound via the device, manage zigbee device, bindings and endpoint 2 for LevelControl and OnOff are both bound to the Zigbee group.
When I activate the switch physically and turn it on, the group turns on: -Good!
When I activate/turn on the switch via Zigbee commands, the group turns on: -Good!
When I dim the switch up or down physically, the group dims: -Good!
When I dim the switch up or down via Zigbee, the group dims: -Good!
When I turn the switch off physically, the lights turn off, the Group indicator on my dashboard still shows as On: -Bad
When I turn off the switch via Zigbee commands, the lights turn off, but the group on my dashboard still shows as On: -Bad
When I actuate the Coordinator Group via the dashboard, everything works as it should.
I tend to use the switches/entities for dashboard controls as it cuts down on mesh network traffic at the coordinator level (I think), as group messaging tends to overwhelm the mesh when too many commands come too fast. (turning off a bunch of different groups quickly in a house shutdown sequence can overwhelm the mesh, turning off 10 switches (bound to groups) never seems to have an issue.
So it sounds like everything works in terms of commands (physically or via Zigbee), but your issue is that the Zigbee group’s status isn’t always accurate on your dashboard?
Have you considered creating a group in HA to track status instead? This group would be independent of the Zigbee group and binding, but if you’re just looking for a shared item for a dashboard it should be fine?
I switched to Zigbee2Mqtt recently, but I didn’t have an issue with this on ZHA as long as:
lights and switch in the same zigbee group
switch is bound to control the zigbee group, not the lights
I never saw an issue with the zigbee group state not matching the actual state when controlled the switch physically.
However, when controlling from home assistant, I would send on/off commands to the zigbee group, not the switch.
I didn’t like how ZHA handled binding (e.g. it doesnt list the existing binds) and I occaisionally had issues with it claiming a zigbee group had been properly created, but it hadn’t. If I were trying to diagnose this, assuming you have it set up as I described, I would probably destroy and recreate the groups and bindings and see if that fixed it.
If I send too many group commands too quickly I create errors and commands that don’t transmit. (e.g. turning off 6 groups in a shutdown the house automation, or using brightness or color sliders and landing on 80% then 82% then 85% seems to send 3-commands and overload the max zigbee message count) That’s why sending a single command to a switch in a bound group seemed to tax the mesh less.
I’ve thought about switching back to Z2MQTT, but the huge number of entities it created turned me off back then, and with 160 devices on the mesh, that issue would be compounded.
It’s all just time/energy. I’ll probably pick a couple of my smaller groups and see if a rebuild fixes it.
Agree with the pain of switching between ZHA and Zigbee2mqtt. I never want to do it again!
I would think that in theory, commanding the switch would be the same as commanding the group, assuming the switch is then sending out a command to the group, but maybe in practice it works better because of timing and location, or other reasons.