Currently, if you want to list all entities in a given area or all entities having a given label, you do this:
{{ area_entities('kitchen') }}
{{ label_entities('kitchen') }}
If you want all entities in multiple given areas you can do this:
{{ ['kitchen', 'bedroom', 'bathroom']
| map('area_entities')
| sum(start=[]) }}
(Practical example shown here).
Similarly, to get all entities having multiple given labels, you would do this:
{{ ['outdoor', 'battery', 'temperature']
| map('label_entities')
| sum(start=[]) }}
This Feature Request proposes simplifying the process by enhancing area_entities
and label_entities
so they support multiple entities as arguments.
{{ area_entities('kitchen', 'bedroom', 'bathroom') }}
{{ label_entities('outdoor', 'battery', 'temperature') }}
In effect, this FR asks to have them behave like expand
which, when used as a function, can accept a comma-separated string or a list:
{{ ['group.doors_exterior', 'group.doors_interior'] | expand | list }}
{{ expand(['group.doors_exterior', 'group.doors_interior']) | list }}
{{ expand('group.doors_exterior', 'group.doors_interior') | list }}