Count media players with specific media_title information?

Try this version. It will report a list containing which media_player has the signal word.

{{ states.media_player
   | selectattr('attributes.media_title', 'defined')
   | selectattr('attributes.media_title', 'search', 'SWR3')
   | map(attribute='entity_id') | list }}

You’ll need that if your goal is to lower the volume of the media_player that’s playing an advertisement.

1 Like