Hi. I found this little snippet to make a list of entities in a certain state. How can I expand upon this a bit? I’d like it to be device_class door, or motion, or sound or smoke. Thanks!
{{ states.binary_sensor
| selectattr('attributes.device_class', 'defined')
| selectattr('attributes.device_class', 'eq', 'door')
| selectattr('state', 'eq', 'on')
| map(attribute='attributes.friendly_name')
| sort
| join(', ') }}
Alternately, I also found this to do it by integration. What’s the syntax to add the entity state after the friendly name?
{% for entity in integration_entities('envisalink')-%}
{{ state_attr(entity, 'friendly_name') }}
{% endfor %}