Assist replays last TTS response when server URL switches between internal and external
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 57/100
Research direction
Start in common/src/main/kotlin/io/homeassistant/companion/android/common/assist/AssistViewModelBase.kt around playAudio() and inspect how urlFlow().flatMapLatest handles a URL switch. Then read AudioUrlPlayer playback flow and its STATE_ENDED handling. Reproduce by finishing a streaming TTS response and switching between internal and external URLs; done when the response does not replay and playback resources are released.
Written by the indexing model from the issue text.
Description
Home Assistant Android app version(s):
2026.10.1-full (same code in 2026.11.1)
Android version(s):
17
Device model(s):
Samsung Galaxy Z Fold7 (SM-F966U1)
Home Assistant version:
2026.10.4
Last working Home Assistant release (if known):
Unknown
Description of problem, include YAML if issue is related to notifications:
HA app is my default assistant (voice pipeline, streaming TTS). After a response finishes, the same response plays again from the start every time the app switches between internal and external URL (leaving or joining home Wi-Fi). Happened 3 times in 13 minutes with the screen off. No new pipeline runs on the server.
Looks like playAudio() wraps the player in urlFlow().flatMapLatest, so every URL change restarts playback of the same TTS path:
https://github.com/home-assistant/android/blob/2026.10.1/common/src/main/kotlin/io/homeassistant/companion/android/common/assist/AssistViewModelBase.kt#L370-L382
AudioUrlPlayer also doesn't close its flow on STATE_ENDED, so the collection (and audio focus) stays alive as long as AssistActivity does.
Companion App Logs:
11:30:33.261 D ServerConnectionStateProviderImplKt: Using internal URL
11:30:33.262 D AudioUrlPlayer$playAudio: Flow closed, releasing player
11:30:33.333 I ExoPlayerImpl: Init ff433e0 [AndroidXMedia3/1.11.1]
11:30:36.428 D AudioUrlPlayer$playAudio$1$player: Stream playback ended
dumpsys audio (original response at 11:17:20, then 3 replays):
11:17:20 new player piid:8687 io.homeassistant.companion.android usage=USAGE_ASSISTANT
11:24:02 new player piid:8719 io.homeassistant.companion.android usage=USAGE_ASSISTANT
11:25:13 new player piid:8727 io.homeassistant.companion.android usage=USAGE_ASSISTANT
11:30:33 new player piid:8743 io.homeassistant.companion.android usage=USAGE_ASSISTANT
Screenshot or video of problem:
N/A
Additional information:
Force stop clears it.
- Dominant language
- Kotlin
- Stars
- 4k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 124
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from home-assistant/android
-
Health Connect "Active calories burned" sensor reports only the newest single record instead of a daily totalPossibly taken A pull request linked to this issue is open or already merged. Openbug sensor-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
home-assistant/android#7803 · 3 comments ·
Maintainers usually reply within 1 day
-
Last notification sensor reports Android's new auto-group summary (`g:Aggregate_…`) instead of the actual notificationPossibly taken @chiva claimed this 5 days ago. Openbug sensor-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
home-assistant/android#7671 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
home-assistant/android#7821 ·
Maintainers usually reply within 1 day
-
Assist bug
Difficulty 3/5 1-2 days Newbie friendliness 57/100
home-assistant/android#7819 ·
Maintainers usually reply within 1 day
-
Android Auto bug notifications
Difficulty 4/5 3-5 days Newbie friendliness 35/100
home-assistant/android#7814 · 1 comment ·
Maintainers usually reply within 1 day
All issues in home-assistant/android
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
QuranHub/quranhub-android#354 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
thunderbird/thunderbird-android#11893 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Droid-Deck/DroidDeck#2198 ·
Maintainers usually reply within 1 day