#Adding light to two groups

1 messages · Page 1 of 1 (latest)

cold summit
#

I have an open plan kitchen/dining area with several lights in it. Some of these lights are "kitchen" lights, some are "dining room" lights, and some are "kitchen and dining room lights".

I want to use my two gang smart switch to control the two areas independently. If EITHER area is turned on, the shared lights should be on. How can I do this?

I tried creating two virtual helper toggles which turn all the relevant lights on/off. But when I turn off one toggle, it turns off the shared lights, even if the other toggle is still on.

atomic lodge
#

create a "group" helper and put both lights inside. Is that what you are looking for? If you control group, it will control both, but you can still do it independently

cold summit
#

That doesn't quite work. If I have both groups on, and turn one off, the shared lights turn off.

atomic lodge
#

ah yes, you are right

#

maybe automation can help you, or a template switch

#

where when turned on, it turns on all lights from its own group + shared group

#

and when it is turned off, you would need to check if lights that are in other group, but not in shared one, are on - then close only private lights, else close all lights

cold summit
#

I wonder if there's a more declarative way to describe desired light state. Now I'm thinking a little more, and I'd also like to layer on additional rules like "after 10pm only turn on the smaller lights" and party mode, etc

atomic lodge
#

so what happens if you make 3 groups:

  • groupA: only kitchen lights
  • groupB: only dining room lights
  • groupC: shared lights

2 template switches:

  • switch 1 turn on: turn on groupA + groupC lights
  • switch 1 turn off: turn off groupA + groupC if group B is off
  • switch 2 turn on: turn on groupB + groupC lights
  • switch 2 turn off: turn off groupB + groupC if group A is off

You can get the light desired state by looking at its entity (on/off). If you have just 3 lights in total, that's the way, if you have more (or plan to have more in the future), you can abstract them in the group now

cold summit
#

I guess that's like building my own set intersection logic. Thanks for the advice!