Indeed - I ended up with:
sensor:
- platform: template
sensors:
unavailable_entities:
friendly_name: Unavailable Entities
value_template: "{{states|selectattr('state', 'in', ['unavailable', 'unknown', 'none'])
|rejectattr('entity_id', 'in', state_attr('group.entity_blacklist', 'entity_id'))
|rejectattr('entity_id', 'eq' , 'group.entity_blacklist')
|map(attribute='entity_id')|list|length }}"
attribute_templates:
entities: "{{states|selectattr('state', 'in', ['unavailable', 'unknown', 'none'])
|rejectattr('entity_id', 'in', state_attr('group.entity_blacklist', 'entity_id'))
|rejectattr('entity_id', 'eq' , 'group.entity_blacklist')
|map(attribute='entity_id')|list|join(', ') }}"
unit_of_measurement: items
…And using an automation to update the sensor every second. Works well