Monitor unavailable state of (rest) integrations

vingerha is on the right track, expand will take the list of entity_id’s and convert it to a list of state objects, and then the filtering will work. Then it can be mapped back to an entity_id or a friendly name depending on what output you want.

{{ integration_entities('rest') | expand | selectattr('state', 'eq', 'unavailable') | map(attribute='entity_id') | list }}

However there are more polished solutions for listing all unavailable entities.