Groups with asymmetric behavior between on/off

Hi there, just converted to using hass.io from a previous solution I coded by self using python and openzwave. Mostly has been going well, but I can’t figure out how to replicate one type of behavior that I’ve come to rely on.

In my previous system, I could define a group of devices, lets say all the light switches in the kitchen. Then I would define “on” and “off” behaviors that would manipulate different subsets of lights. For example, “on” for the kitchen may only mean turn on 3 of the switches. But “off” for the kitchen means turn all the lights off.

Is there a built in construct in home assistant that allows me to achieve similar behavior? I use this a lot hooked up to alexa so that I can say “turn on kitchen” to turn on just a subset of the lights, but “turn off kitchen” to turn on everything that was on. The best I could think of was to create a “kitchen on” scene and a “kitchen off” scene, which is a little clunky.

You can create scenes in HA. That will give you a specific light setup.
There is an app/script that you can use to generate a scene with the lights as you want them to appear

https://home-assistant.io/docs/ecosystem/scenegen/

Right. I did figure out the scene part (and use them for other things), but what I"m looking for is to have a sort of smart “group” where turn_on means some of the devices turn on, whereas off means all of the devices turn off. There’s no way to direclty express this HA as far as I can tell, thats not having just separate scenes for on and off.