Hello everyone,
i have this code
{%set Lijst = states
|selectattr('domain', '==', 'media_player')
|selectattr('entity_id', 'search',Plaats|lower)
|selectattr('entity_id', 'search', 'sonos')
|map(attribute='entity_id')
|list
%}
{{Lijst}}
that gives this result
['media_player.living_sonos', 'media_player.living_sonos_2']
But I would only have the media players with sonos in them, not the_2,_3,_4, etc.
Is this possible? if so, how?
Thanks in advance