Skip to content

Use glob pattern with add_entity_to_area #298

Closed Answered by frenck
anoblet asked this question in Q&A
Discussion options

You must be logged in to vote

Template:

{{ 
   states
   | selectattr('entity_id', 'search', '^light.living_*')
   | map(attribute="entity_id")
   | list
}}

Combined in a service call:

- service: homeassistant.add_entity_to_area
  data:
    entity_id: >
      {{ 
         states
         | selectattr('entity_id', 'search', '^light.living_*')
         | map(attribute="entity_id")
         | list
      }}

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@anoblet
Comment options

@frenck
Comment options

Answer selected by anoblet
@frenck
Comment options

@anoblet
Comment options

@frenck
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants