I have the following YAML code that gives me a list of all entities that can be updated:
{% set entities = states|selectattr('domain','in','update') %}
{% set updates = entities|map(attribute='entity_id')|list|sort %}
{{ updates }}
How can I use selectattr or rejectattr filters to get only the entities that have an update available and their state is βonβ?
I am really having trouble using the Jinja2 documentation and applying it to Home Assistant, so I was hoping that maybe someone here just knows how to do it.