#exclude area_id in action for person = home

1 messages · Page 1 of 1 (latest)

low sand
#

using things like this now

      action: light.turn_off
      data:
        entity_id: >
          {% if is_state('person.daughter','not_home') %} light.alle_binnen_lampen
          {% else %} light.primaire_binnen_lampen,light.plafond
          {% endif %}```
but seeking to rewrite those with area_ids/label_id's, and not have to maintain all of those groups.
do we have a smart way of turning off all lights, except for a single room (area) that belongs to a certain person?
this is a bit simplified, and must be expanded to in/exclude more rooms, based on the presence of certain persons
wintry palm
low sand
#

hehe, sure... I had hoped to do it without templates, and maybe add straightforward conditions to the automation in some chooser though. not sure what would be best