#Looking to exclude a light from some automations

1 messages · Page 1 of 1 (latest)

supple tundra
#

I have a pair of automations which use a presence center to turn on or off the lights in an area. I recently installed some LEDs on my 3D printer in the same area, and would like to exclude those lights from these automations.

The current automation has as its “then do”: “Light ‘Turn on’ in Shed”. Worst case, I could call out each individual light I want to turn on, but is there a more graceful way to specifically exclude the LED Chamber Light? I’m open to solutions that use labels or the like. Thanks in advance!

visual violet
#

The easiest way is to label the ones you want to control and target that label

#

You can dynamically generate a list where you exclude some number of entities, but I'm not sure that's any better in the long run

supple tundra
#

Okay, I can do that — but there’s no way to do the inverse, to turn on/off all but label-X ?

visual violet
#

You can with a template

#

But if you're already labeling items, just label the ones you want to control

supple tundra
#

Thank you!

visual violet
#

if you really want a template:

{{ area_entities('Craft Room')|reject('in', label_entities('test'))|list }}
#

somethign like that

supple tundra
#

I also learned that including an area and a label is OR not AND

visual violet
#

yes, that makes sense

supple tundra
#

Well, it makes sense to be one or the other I guess, I’d hoped for the AND myself 🙂