Exclude group-entities from domain light

Hi,
is there a way to get name-list of all lights domain excluding the lights in a group?

This works correctly, but I need list of names of entity (not list of entity_id)

{{states.light 
|selectattr('state', 'eq', 'on') 
|selectattr('last_changed', 'lt', now() - timedelta(minutes=15)) 
|map(attribute='entity_id') 
|reject('in',states['group.luci_escludi_persistenza'].attributes.entity_id) 
|join(',')}}

This not works correctly (it works when ONLY lights of the group are on, if other lights are on, the list shows all light on, included the lights of the group…)

{{ states.light
|selectattr('state','eq','on')
|selectattr('last_changed','lt',now()-timedelta(seconds=5))  
|rejectattr('entity_id', 'in', expand('group.luci_escludi_persistenza')|map(attribute='entity_id'))
|map(attribute='name')
|join(',')|replace("_","-") }})

Thanks
MC