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:
- Turn off lights in floors x, y and z
- 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.
Workaround
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:
- Turn on lights marked with label foo
- 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.