Sorry team I’m a little confused on how to achieve this.
I have 3 (well even 4 and up to 8) switches with multiple gangs each.
Each of them has one gang that should switch on and off a light (light.1).
Let’s say that switch.gang is the name
I need to have 1.3 - 2.2 - 3.1 that all switch on/off light.1
My expectation is that if press 1.3 then 2.2 andf 3.1 get pressed too and light.1 is turned on
If I press 2.2 and the light is on… then light.1 is turned off and 1.3 and 2.2 are off too
I’m not sure what you mean. Multiple switches can operate the same light. The state of the light will be shown in HA. But the switches have no state in Home assistant, so they do not change when another switch is operated.
If you want each switch to toggle the light, then each change of the button should call the service light.toggle:
As for the light itself and keeping the toggles in sync, I assume 0.01 is physically connected to the light. So if you switch that from HA the light should react. Other switches should have an automation to toggle that entity in HA to make the light react, and the automation should sync the states of all switches in HA to reflect the proper state. Don’t know what that will do to the led.
Wait: I was thinking way too complicated. Just adjusted the code above. All switches must mimic each other, and if is not a problem to switch the same switch again. As all switches always go to the same state, the risk of this endlessly looping is gone. But keep it in single mode though so it won’t run too often by triggering itself again. Just tested and it works. Also adjusted it a little bit so it works on anything you can turn on and off.