core
core copied to clipboard
Media player does not go back to "idle" after playing TTS announcement
The problem
On HA 2025.4.x, playing a TTS announcement via tts.cloud_say on a speaker running ESPHome (Raspiaudio Muse Luxe ~~and HA Voice PE~~) causes the media_player entity to remain stuck in status "playing" instead of going back to "idle" after audio playback is over. It worked well until HA 2025.3.4. Unless stopped manually, the same TTS announcement is played again on the speaker every 2 minutes, in a loop. In other words, the media_player stays in "playing" status forever and plays the same announcement repeatedly every 2 minutes, with silence in between and an audio glitch after each repetition (glitch that also wasn't there until HA 2025.3.4).
What version of Home Assistant Core has the issue?
2025.4.0b12
What was the last working version of Home Assistant Core?
2025.3.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Media Player
Link to integration documentation on our website
https://www.home-assistant.io/integrations/media_player/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (media_player) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of media_player can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign media_playerRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
media_player documentation media_player source (message by IssueLinks)
CC @synesthesiam
The problem is still present on HA 2025.4.0 with Raspiaudio Muse Luxe running ESPHome 2025.3.3, i.e. the speaker media_player entity does not go back to "idle" status after playing a TTS announcement, and there is now also an audio glitch at the end of the announcement which wasn't there with HA 2025.3.4. The same problem is not present anymore instead on HA Voice PE running firmware 25.3.4 released today.
Cc @tetele
I found that, unless stopped manually, the same TTS announcement is played again on the speaker every 2 minutes, in a loop. So, the media_player is "playing" the same announcement repeatedly every 2 minutes, with silence in between... which I assume is why it never gets back to "idle" state. @synesthesiam Thanks for taking a look and happy to test or provide more information as needed.
Я обнаружил, что, если не остановить вручную, одно и то же объявление TTS воспроизводится на динамике снова каждые 2 минуты, в цикле. Таким образом, media_player «воспроизводит» одно и то же объявление повторно каждые 2 минуты, с тишиной между ними... и я предполагаю, что именно поэтому он никогда не возвращается в состояние «неактивности». @synesthesiamСпасибо, что посмотрели, будем рады провести тестирование или предоставить дополнительную информацию по мере необходимости.
I have absolutely identical situation. Has anyone found a solution?
I am experiencing the same issue since 2025.4.0. When using TTS (With google or piper), the end of the sentence always have the same glitch, then the "Media Player" status stays in "Play" mode, and the sentence repeats after a handful of seconds, to infinite. "Media Player" never goes into "Idle" mode. Cache enabled or not doesn't change anything. Issue is NOT affecting the Tablet (fullykiosk), only the ESP32 based players (I2S Audio) in my case.
@MartinHjelmare @synesthesiam Could you acknowledge this is a HA 2025.4.x issue or should we report it to the ESPHome team instead? Many thanks!
@MartinHjelmare @synesthesiamМожете ли вы подтвердить, что это проблема HA 2025.4.x или нам следует сообщить об этом команде ESPHome? Большое спасибо!
I had this problem right after updating NA to 2025.4
I face the same issue after updating to 2025.4
After the latest Firmware update of the atom5 no sound output in the latest HA version.
The problem is still present in HA 2025.4.1.
yep same here - this error makes this version of HA pretty unusable for my household.
There is an open issue for this problem also on ESPHome: https://github.com/esphome/issues/issues/6921 Still unclear whether this is a HA bug or a ESPHome bug.
Some issue. ESPHome MediaPlayer with simplest configuration. looped announcement after use TTS.
I have/had the same issue when I upgraded from 2025.3.4 to 2025.4.1.
I have about 8 esphome players around the house. When there was a house wide announcement all of the active lights on my players would stay lit. At random a single player would repeat the last house wide announcement until the next house wide announcement was played. All of the players are esp32 arduino framework players. Restarting ha would then close the channel and the players would go back to idle until the next house wide announcement (I don't have individual player announcements at the moment so I don't know if the issue carries over to a single player). The house wide announcements are sent to a media player helper group and not the individual media players.
Restarting the esphome service did not correct the issue. They continued to announce at random. Rebooting the players would also stop the announcement on that rebooted player.
Since this my wife approval factor was dropping quickly I rolled back HA core back to 2025.3.4 and everything became right again. I have an issue with recorder and several tasks that depend on it aren't running but at least the house isn't chattering all night. The only thing that was changed is me upgrading to 2025.4.1 and then rolling back the change several hours later to 2025.3.4. This kind of makes me think that something in at least 2025.4.1 has an issue because I can unissue it by putting it back to 2025.3.4
I have/had the same issue when I upgraded from 2025.3.4 to 2025.4.1.
I have about 8 esphome players around the house. When there was a house wide announcement all of the active lights on my players would stay lit. At random a single player would repeat the last house wide announcement until the next house wide announcement was played. All of the players are esp32 arduino framework players. Restarting ha would then close the channel and the players would go back to idle until the next house wide announcement (I don't have individual player announcements at the moment so I don't know if the issue carries over to a single player). The house wide announcements are sent to a media player helper group and not the individual media players.
Restarting the esphome service did not correct the issue. They continued to announce at random. Rebooting the players would also stop the announcement on that rebooted player.
Since this my wife approval factor was dropping quickly I rolled back HA core back to 2025.3.4 and everything became right again. I have an issue with recorder and several tasks that depend on it aren't running but at least the house isn't chattering all night. The only thing that was changed is me upgrading to 2025.4.1 and then rolling back the change several hours later to 2025.3.4. This kind of makes me think that something in at least 2025.4.1 has an issue because I can unissue it by putting it back to 2025.3.4
I can confirm this is also affecting single player/streamer. I did many individual tests (Developer tools -> Action -> TTS with a single ESPHome Player as a target) and issue was happening. Interestingly, playing a Radio does not generate any issue (probably because you have to STOP the stream instead of being stopped when it reaches the end of a length-defined audio stream such as a Chime MP3 or an audio block generated from TTS.
I have a feeling this could be an EOF or End-of-Stream issue, that would explain the glitch at the end, and potentially the reason why the backend deems necessary to re-stream if the end-device does not acknowledges integrity at the end of the audio stream reception.
I found a temporary solution to the repetition problem.
I spent half a day looking for a way out of the repetition problem and found a pattern: if you play MP3 (I saved some messages as a cache in mp3 and play them via mp3) - there are no repetitions. If you play the text via TTS - the last message is repeated endlessly. You can stop repetitions only with the TTS command with the message content dot (".").
In my smart home I use Node RED, and I created a parallel command to play a TTS message "." after 5....10 sec (depending on the main message) after the start of playing the main message.
When the problem is solved - I will simply delete the parallel TTS command.
@Maksys4101 Your observation tracks with what I saw/heard. All of my TTS are played via a script that plays an announcement tone (mp3) before the tts is spoken. Thinking back I did not hear the announcement tone (mp3) as part of the repeat, it was only the spoken voice. I could turn off the light (payer would go to idle) if I sent the announcement tone via Developer tools.
I found a temporary solution with the info from the past few days here. But I use my device only for TTS announcements, so it might not work for all.
I have created an automation triggered by the start of playing of my tts speaker with a duration of 10 seconds and then stop the tts speaker.
The problem is still present in HA 2025.4.2.
The problem is still present in HA 2025.4.2.
Yes. My experience is that it was caused by the HA upgrade from 2025.3 to 2025.4 Hope someone can fix this.
As a workaround, as suggested by @Maksys4101, I now play a very short mp3 at the end of my messages and then there is no repetition.
action: media_player.play_media
@MartinHjelmare @synesthesiam Hoping you had a chance to take a look, could you acknowledge the issue and confirm it will be resolved in an upcoming HA update? Happy to support in any testing/troubleshooting. Thanks!
@MartinHjelmare @synesthesiam Hoping you had a chance to take a look, could you acknowledge the issue and confirm it will be resolved in an upcoming HA update? Happy to support in any testing/troubleshooting. Thanks!
Also prepared to help testing
For anyone looking for a temporary fix - this works... I found that if I pass it a template {{ text string }} then in doesn’t go back to idle, just loops over and over again. BUT, if I pass the same {{ text string }} to the custom component ChimeTTS (which adds a chime MP3 and send it to TTS) then it works fine. So for now I use a chime with all my TTS notifications. This approach solves the timing problem as you don’t need to know how long each one is.
For anyone looking for a temporary fix - this works... I found that if I pass it a template {{ text string }} then in doesn’t go back to idle, just loops over and over again. BUT, if I pass the same {{ text string }} to the custom component ChimeTTS (which adds a chime MP3 and send it to TTS) then it works fine. So for now I use a chime with all my TTS notifications. This approach solves the timing problem as you don’t need to know how long each one is.
When you say to use ChimeTTS, are you talking about the integration from HACS?
This bug renders the Voice Assistant Preview Edition hardware useless and unresponsive after the media player function is used. The device needs to be unplugged and plugged back in to get it to work again--and even then I get some protests from the voice assistant about media player being on play and initial refusal to execute a spoken command, asking me if I'd like to stop the media player.
The problem is still there with ESPHome 2025.4.0. :( Really looking forward to a solution.
Hey all!
I am trying to reproduce this, but I cannot find a standalone, simple use case that makes the media player stuck at playing.
Here is what I tried, and my setup.
Home Assistant OS / core 2025.4.2 Voice Preview Edition, official firmware, not adopted on ESPHome Builder. Firmware: 25.3.4 (ESPHome 2025.3.3)
I went to the dev tool and tried 3 different actions that can all be used to perform announcements.
These are the exact action calls I used.
action: tts.cloud_say
data:
cache: false
entity_id: media_player.vpe_bureau_media_player
message: TEST!
action: tts.speak
target:
entity_id: tts.home_assistant_cloud
data:
cache: true # I also tried false
media_player_entity_id: media_player.vpe_bureau_media_player
message: TEST!
action: assist_satellite.announce
data:
message: TEST!
target:
entity_id: assist_satellite.vpe_bureau_satellite_assist
I am also attaching a small video to show you that I cannot properly reproduce.
https://github.com/user-attachments/assets/d86fcf11-63d5-467f-9835-9c4f674b6c39
Can someone share a sample of the action call that makes the VPE media player stuck in playing please?
Thx a lot! JLo
Hi Martin, I can't do a video but the screenshot shows that what you wanted.
Firing the TTS action causes the Player to go in a "playing" state and stay there until next reboot of the device:
In the logs of the raspiaudio device I see this. With every yellow entry, the last sentence gets repeated
Hope that helps.
Is it clear, where the problem is coming from? HA Core? Google TTS? ESPHome? Mediaplayer?