Skip to content

Playback music requests on the triggered media player device if no area or device are specified - #125

Open
jarneson33 wants to merge 3 commits into
music-assistant:mainfrom
jarneson33:main
Open

Playback music requests on the triggered media player device if no area or device are specified#125
jarneson33 wants to merge 3 commits into
music-assistant:mainfrom
jarneson33:main

Conversation

@jarneson33

Copy link
Copy Markdown

Thank you for this blueprint! It has helped me a lot! I have recently gone from only a single satellite for HA to 2 and now that I can't rely on the default player fallback I wanted to tackle the challenge of getting the music request to simply route to the device that triggered it as long as the device itself is a media player and you did not specify an area or device. This is the expected functionality for many who are use to Alexa/Google devices.

Getting this to work was pretty straightforward and I have been using this setup for a while and wanted to see if this change was something the rest of the community would be interested in. I would think this change could be part of the LLM blueprints as well but I currently only use the local version. Thank you for your consideration the high level changes are as follows.

• Introduced a new variable to capture if the device that triggered the voice request is a media player.

• Updated the fallback logic to check if the triggering device is a Music Assistant media player.

• If no device or area is specified in the request, and the triggering device is a Music Assistant media player, the automation will now use that device as the first fallback target for playback.

• If the triggering device is not suitable, the automation continues to fall back to the area or the user-selected default player as before.

This change ensures more intuitive and context-aware playback behavior when handling voice requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant