Light group on/off if ALL lights are on/off (SOLVED)

Hi,

Not sure how to explain this well, so bear with me. I’m kiiinda new to Home Assistant, and I’m messing with grouping some lights, which is fine. It works for turning on/off groups of light.

In this case I have a group of lights for downstairs and upstairs, and also ALL lights (in the entire house). So e.g. downstairs I have 3 groups. Bathroom, Living room and kitchen.

My problem is:
If I turn on Bathroom light, the group “Downstairs” is also registered as being on.
So when I look in my logbook, not only is the Bathroom on, but also Downstairs and All Lights.

Is it possible to define that I don’t want these groups to be “on” unless ALL lights within that group of lights are on?

So “Downstairs” won’t be “on” unless Bathroom, Kitchen and Living room is on?

Or is there another way around this?

Thank you!

1 Like

Yes, very easy to do.

Just add all: true to the group config.

group:
  downstairs:
    name: Downstairs
    all: true
    entities:
      - group.kitchen
      - group.bathroom
      - group.living_room
3 Likes

Fan-f…-tastic! THANK YOU!

You’re welcome.
And welcome to the world of Home Assistant!

Thank you! Loving it already!

If you could mark this thread as solved, it will help people find it in the future :slightly_smiling_face:

Has been done! :slight_smile: Thanks!

1 Like