I have set up the following Automation with one switch (Front) as a “controller” and other switches as “Slaves”. The purpose is that when Front is ON, then the others are ON and when Front is OFF then the others are OFF.
This generally works well, but if HA is temporarily not working (I may be updating an Integration, HA Firmware, etc), and the Front is activated, then the Automation reverses itself whereby IF Front is ON then the “Slaves” are OFF. I must then turn the “Slaves” ON in the HA Dashboard to make the Automation work again as intended.
I could replace this Automation with 2 Automations, one for setting ON and another for setting OFF, but I wonder if this can be achieved in one Automation.
This is what I have now:
If these switches should always function together, setup a switch group. If you need to maintain individual control of the switches for other purposes you can accomplish your goal as follows:
That’s because I’m an idiot sometimes… When using a group you can still turn individual members of the groups on and off by themselves. Just make sure you read and understand the group behavior setting documentation so you can have the switch group entity show up in your UI the way you expect.
If I understand your case correctly, “Front” is a physical device. The problem with a switch group in that situation is that a switch group does not give Controller status/powers to the physical device. Controller status goes to the virtual switch while the entities that represent the physical devices remain agents. So, you would have to set up an automation anyway.
You were in fact right the first time. With the Group suggestion, when I click on the Front switch the other two switches do not go ON or OFF, because precisely they can be controlled individually. With your first suggestion when A is clicked, B and C react. When I click on B or C, they react only individually. THAT is exactly what I want.