Easiest way to turn off ALL lights EXCEPT for a certain one?

I searched and couldn't find an answer. It's a problem I'm sure many encountered.

I have an "I'm Leaving" rule in which I wish for ALL lights to turn off EXCEPT for the ones leading out of the house. I have 20+ switches of various types so selecting them all is a pain)

I tried turning all lights off (one virtual switch for me) then turning the wanted light on, but that causes it to go off for a second or 5, annoying the wife who is also leaving.

Whether it's scenes or groups or just a lot of actions, I feel like I can't do this without selecting every single light switch and telling it to go off individually if I want one to stay on.

How do you folks deal with this? Thanks in advanced!

How do you make the system do something without telling it what you want it to do? Well, quite frankly, you can't. However, the easiest thing to do is create a scene or a rule triggered by a virtual button that turns your lights off. That way, when you need to use it within your automation for "I'm leaving" you just have to activate the virtual switch or that scene. That way, when you add more lights, you just have to add them to the lights off automation and not everywhere that scene/virtual switch is used.

Hey Ryan, thanks for the response.

Yeah, that's what I was thinking. There's always more efficient ways to do things and I don't know all the tricks yet, so I was polling.

I already made this a bit easier by having switches for groups, so I can at least say "Turn off a, b, c, d lights and the basement lights". I just didn't know if there was a way to do an 'exception'. Might be a nice feature or new app or something.

Turn off all the lights

Don't Affect Front Door Light

Exceptions are not part of Rule Machine.

Put all of them except one in a group. Then turn that group off.

Have you looked at the Simple Lightning app? Select your switches and to turn them off.
As trigger, I’m sure you find one. If not, make a virtual switch or button and trigger that from somewhere.

Cool, thanks all!