"Except these lights" filter in light services (on/off/toggle)

Now as the latest release introduced the brilliant floors and lablels, controlling lights using scripts works almost perfectly. I propose following feature to help controlling lights in the following scenario. So far I have handled this using my own, custom script, but this could very well be a built-in feature:

The use case
In specific use cases (eg. when we are about to go to bed) I want to turn on certain lights (eg. tagged with a label) and turn off all other lights (eg. all other lights in floors x, y and z).

The problem
The lights can now be controlled easily with labels and floors, eg:

  1. Turn off lights in floors x, y and z
  2. Turn on lights marked with label foo

Unfortunately, doing so results in a moment of total darkness, as it takes some time until the step 2 is executed and completed. Step 2 cannot be executed before step 1, as the lights would then be turned off in the next step.

The problem can be solved by either controlling lights individually or with a custom script, eg. to literally turning lights on and off in correct order to avoid total darkness. In our case I have written a custom script to handle this case.

Proposed solution
I propose that the light services could have a setting for except these entities. Configuring the above scenario could then be:

  1. Turn on lights marked with label foo
  2. Turn off lights in floors x, y and z except lights marked with foo

Eg. there could be a setting where you could select entities which should be excluded from the action being executed.

Simply add another label on the ones you don’t want to control in that scenario and use that to remove them from your list.

1 Like

Can you be more specific? I have helluva lot of lights, I don’t want to add labels to all lights except the few ones I want to keep on. I would not call that pretty. Whenever a new light would be added, it should be labeled to be turned off, otherwise it would be left on when the script is called. With my proposed solution only the specific lights need a label, which is easier to manage.

The following block would work perfectly if I could exclude just a few lamps using a label instead of labeling a lotof lamps with the opposite meaning.

I do have a custom script to handle this, but it is not pretty either.