Automation: How to link 3 different switches together automatically?

Hi all,

I have 3 different switches in my house, as per below:

  1. 1 pcs Master Switch - Located in my bedroom
  2. 1 pcs Living Room Switch (Control 1 light) - Located in my living room
  3. 1 pcs Dining Room Switch (Control 1 light) - Located in my dining room

Purpose of this settings:
When I going to sleep, I just press the Master Switch in my bedroom. Then all lights in Living Room and Dining Room is turned off, so that no electricity is wasted =)

I would like to set Master Switch to control both Living Room Switch and Dining Room Switch at the same time, as per logic below:

  1. If Master Switch is turned on, then both Living Room Switch and Dining Room Switch is automatically turned on. Vice versa.
  2. Either one of Living Room Switch and Dining Room Switch is turned on, then Master Switch should turn on as well. Until both Living Room Switch and Dining Room Switch is turned off and no one pressed Master Switch during this period, then only Master Switch will automatically turn off as well.

I have tried to use light.toggle method, but it does not works as expected.

Could anyone provide some guidance on this?

Thanks.

Just create a group with the switches or lights that you want.
groups.yaml
Family Room:
- light.family
- light.tv_backlight
- switch.tv2_power
- switch.vsx_power
- switch.stb_power

44%20PM

1 Like

Thanks.

It works for my case.