core: media_player.media_pause on chromecast devices doesnt work
The problem
The service media_player.media_pause on chromecast devices doesnt work.
What version of Home Assistant Core has the issue?
2024.3.0
What was the last working version of Home Assistant Core?
2024.2.0
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
service: media_player.media_pause
target:
entity_id:
- media_player.chromecast_1
data: {}
Anything in the logs that might be useful for us?
Logger: homeassistant.helpers.script.websocket_api_script
Quelle: helpers/script.py:485
Erstmals aufgetreten: 20:58:01 (5 Vorkommnisse)
Zuletzt protokolliert: 21:02:11
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Failed to execute pause.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 485, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 723, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 685, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2319, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 828, in async_media_pause
await self.hass.async_add_executor_job(self.media_pause)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 518, in media_pause
media_controller.pause()
File "/usr/local/lib/python3.12/site-packages/pychromecast/controllers/media.py", line 636, in pause
response_handler.wait_response()
File "/usr/local/lib/python3.12/site-packages/pychromecast/response_handler.py", line 54, in wait_response
raise RequestFailed(self._request)
pychromecast.error.RequestFailed: Failed to execute pause.
Additional information
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 21
- Comments: 67 (13 by maintainers)
Commits related to this issue
- cast: workaround integration bug when player is off https://github.com/home-assistant/core/issues/112644 — committed to daniele-athome/home-assistant by daniele-athome 2 years ago
- cast: workaround integration bug when player is off https://github.com/home-assistant/core/issues/112644 — committed to daniele-athome/home-assistant by daniele-athome 2 years ago
I can confirm this issue, happens to me as well after updating to 2024.3.0. As a result all of my automations which include this command completely abort at the respective step, and subsequent commands are not executed
Similar issue here. I get
HomeAssistantError: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://[ip]:[port]/api/tts_proxy/b858cb282617fb0956d960215c8e84d1ccf909c6_it_-_tts.google_it_it.mp3.when I try to send a message for my Google Home to pronounce. It seems that the message is always dropped when the Google Home is ‘woken up’ by the message. From then on, it reads the message. For me, the workaround of sending an empty message to ‘wake up’ the Google Home worked, then sending the actual message to be spoken, even though the error message still appears.
This problem has not been solved. The core version has been updated to 2025.1.0, but it still cannot be used.
无法执行动作“media_player/play_media” 。 already streaming to device
I’m now using Core 2024.9.2 Supervisor 2024.09.1 Operating System 13.1 Frontend 20240909.1
The issue is resolved I have opened a ticket for this with nabu casa as it is related to service they provide and talking to Ashton in support I will keep you all posted…
On Thu, 3 Oct 2024, 17:26 gpuccio87, @.***> wrote:
media_player.media_pause does not work on ANY of my Google Media Players.
Same issue here with the latest HA now 2024.7. The casting sometimes work and sometimes not, I counldn’t figure out a pattern. It indicates the casting stopped due to timeout when automation failed in HA. However, the destination soundbar shows it is receiving casting media (but nothing plays), therefore it could be a protocol or timing issue?
@emontnemery still happens in 2024.4.3
Logger: homeassistant.components.automation.house_reset_routine_new Source: helpers/script.py:1918 integration: Automation (documentation, issues) First occurred: 08:30:17 (1 occurrences) Last logged: 08:30:17
House Reset Routine New: Error executing script. Error for call_service at pos 37: CastMediaPlayerEntity.media_stop Failed: Failed to execute stop.
Same issue here. Causes many automations to fail. I see this error with both “media_player.stop” and “media_player.pause”. Running 2024.3.1.