Skip to content

Forward announce flag to the device in play_media - #329

Open
baileyboy0304 wants to merge 1 commit into
msp1974:devfrom
baileyboy0304:fix/forward-announce
Open

baileyboy0304 wants to merge 1 commit into
msp1974:devfrom
baileyboy0304:fix/forward-announce

Conversation

@baileyboy0304

Copy link
Copy Markdown

Problem

media_player.play_media with announce: true stops the music playing on a VACA device instead of ducking it under the speech.

async_play_media logs announce but sends only url and volume in the play-media action. The app therefore can't tell an announcement from normal media and plays it on the music player, replacing the current music. The entity is also marked PLAYING and its metadata overwritten, even though the announcement only plays over the music.

Change

  • Adds "announce": bool(announce) to the play-media payload.
  • For announcements, returns before setting the state to PLAYING and before processing metadata, so the media state reflects the music still playing underneath.

Compatibility

Testing

Tested with the app change on a Facebook Portal+ using Music Assistant and an Echo Dot forwarding Assist TTS with announce: true:

  • The app received announce=true, and the music ducked and returned without manual intervention.
  • The media player state stayed with the music.

🤖 Generated with Claude Code

async_play_media logged `announce` but sent only url and volume, so the
app played announcements on the music player, replacing the current
music. Pass `announce` in the play-media payload, and leave the media
state and metadata unchanged for announcements since they play over any
current media.

Requires the companion app change that routes announce=true to a
separate player; older apps ignore the extra field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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