Problem: The Plex integration, when played from an Alexa device, will show up as many different media players over time, such as media_player.plex_plex_for_alexa_alexa_4, media_player.plex_plex_for_alexa_alexa_5, etc. Only one of these is ever playing at once, and I would like to refer to this media player device in a script.
But obviously this approach only refers to one specific device. Is there a way to refer to the currently playing media player with “plex_plex_for_alexa_alexa” in its name?
Thank you! There’s a slight error in your script (should be attribute not attributes), but that’s exactly what I needed.
The message is all on one line because multiline annoyingly inserts a space before “Title”. For anyone else that would find this useful, the working script is below.