Any alternative to old style groups or Spook for dynamic groups?

I’ve only being using Home Assistant for about 2 weeks, and I’m aware that similar questions have been asked. However, I couldn’t figure out a clear answer, so here I am!

Use Case
I’ve got a bunch of lights in a room and a Phillips Tap Dial switch.
I’d like to be able to switch to different scenes and then have only the lights in the scene be controlled by the dial. The catch is that some lights are part of multiple scenes.
eg. Press Button 1 enables a dining scene.
Double press Button 1 enables a sofa scene
Press Button 2 enables a movie scene
Double press button 2 enables a reading scene

Once a scene has been selected, pressing Button 3 will set the dial to control the brightness only of the lights in the selected scene.
Pressing Button 4 will control the colour temperature of only the lights in the scene.

For my initial attempt, I thought I could create an ‘active_lights’ group.
Depending on which button is pressed, add the required lights to the group and control the brightness and temperature of the ‘active_lights’ entity. This felt like a neat solution, because I need only set up one automation to turn on the ‘active_lights’ and apply any settings to them (like Adaptive Lighting for example), and then set some helpers depending on buttons 3 and 4 to select between control of their brightness or temperature. Unfortunately, this kind of dynamic behavior isn’t supported by light groups.

I don’t want to use old groups, because they seem like they aren’t supported anymore.
This could also be done by dynamically managing labels with the Spook integration.

Before I dive into one of those options, I like to know if there is a core Home Assistant way of doing this?
I’ve read a couple of posts and the answer seems to be ‘not really’.

:slight_smile:

I use an input select to keep track of which scene is active.

This is then used in automation conditions that control the lights.

They are. Just not recommend if you can use the new groups. There are still cases where this is not possible as you have found.

Thanks Tom.
I am also using an input select to keep track of scenes.

After a bit of experimenting, I’ve settled on using a mixture of light groups and dynamic labels managed through Spook to track which lights are active and/or controlled by the dial.

For every logical group of lights, I make a light group.
When I turn a group on I label it as ‘active’ and remove the label from all other light groups. Subsequent controls reference the ‘active’ label.
This way, I can still have the core light group controls on my dashboard to override anything set by the dial.

It’s too bad that the new groups aren’t dynamic. Dynamic groups make for a very natural way to manage complex controls.