Repository navigation
Forward announce flag to the device in play_media - #329
Open
baileyboy0304 wants to merge 1 commit into
Open
baileyboy0304 wants to merge 1 commit into
baileyboy0304 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
media_player.play_mediawithannounce: truestops the music playing on a VACA device instead of ducking it under the speech.async_play_medialogsannouncebut sends onlyurlandvolumein theplay-mediaaction. 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 markedPLAYINGand its metadata overwritten, even though the announcement only plays over the music.Change
"announce": bool(announce)to theplay-mediapayload.PLAYINGand before processing metadata, so the media state reflects the music still playing underneath.Compatibility
announce: trueon a separate player that ducks the music.Testing
Tested with the app change on a Facebook Portal+ using Music Assistant and an Echo Dot forwarding Assist TTS with
announce: true:announce=true, and the music ducked and returned without manual intervention.🤖 Generated with Claude Code