Play only one media player when there are two in the area

I’ve got a Voice PE and a squeeze player in the same area, and I am targeting the voice command ‘play some music’ to the area, as I have more than 1 area with this setup and I don’t want to have to say ‘in the … kitchen’ and for it to know that already with this code:

area_id: "{{ trigger.slots.def_area if defined else area_id(trigger.device_id) }}"

However, when I say ‘play some music’, both the squeeze player and the voice PE start playing music.

I want only one media player to start playing music, as the speaker on the Voice PE is not very good. How can I get only the squeeze player to respond ?

I was wondering whether I could get a list of media players in the area and parse them to only return the entity_id of the squeeze player ?

For anyone else interested in this, I fixed the issue by using the area id to list the entities and targeting the first entity that matched the substring ‘squeeze’.

    target:
      entity_id: >
        {% set areaname = trigger.slots.def_area if defined else
        area_id(trigger.device_id) %} {{(area_entities(areaname) |
        select('search', 'squeeze') | list)[0]}}