home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.28k forks source link

Media player automation doesn't play media anymore. missing 1 required keyword-only argument: 'timeout' #116766

Closed hvdb closed 1 week ago

hvdb commented 2 weeks ago

The problem

My automation should play media on my speakers, but that now fails after the update to 5.1

BaseMediaPlayer.quick_play() missing 1 required keyword-only argument: 'timeout'

I don't see an option to specify this either.

What version of Home Assistant Core has the issue?

2024.5.1

What was the last working version of Home Assistant Core?

2024.4.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automation

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.components.automation.deurbel Source: components/automation/init.py:723 integration: Automation (documentation, issues) First occurred: 10:48:29 (102 occurrences) Last logged: 12:16:31

While executing automation automation.deurbel Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/automation/init.py", line 723, in async_trigger return await self.action_script.async_run( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1731, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 503, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 533, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/trace.py", line 284, in async_wrapper await func(args) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 874, in _async_repeat_step await async_run_sequence(iteration, extra_msg) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 856, in async_run_sequence await self._async_run_script(script) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1210, in _async_run_script result = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1731, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 503, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 533, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1000, in entity_service_call raise result from None File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1605, in async_request_call return await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 783, in async_play_media await self.hass.async_add_executor_job( 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 106, in wrapper return_value = func(self, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 514, in _quick_play quick_play(self._get_chromecast(), app_name, data) File "/usr/local/lib/python3.12/site-packages/pychromecast/quick_play.py", line 87, in quick_play controller.quick_play(data) TypeError: BaseMediaPlayer.quick_play() missing 1 required keyword-only argument: 'timeout'

Executed: 4 May 2024 at 12:16:31 Error: BaseMediaPlayer.quick_play() missing 1 required keyword-only argument: 'timeout' Result: params: domain: media_player service: play_media service_data: media_content_id: >- http://xx.xx/ding.mp3 media_content_type: audio/mp3 entity_id:

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 weeks ago

Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (cast) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `cast` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign cast` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


cast documentation cast source (message by IssueLinks)

hvdb commented 1 week ago

I have investigated the docker container where HA is installed in. And I see that it does not use the latest pychromecast

It indeed misses the timeout=timeout option that was introduces

hvdb commented 1 week ago

Alright I got it resolved for now by updating the pychromecast dependency inside the HA container.

CATT 0.12.11 Installed pychromecast 13.x

looking at CATT pychromecast = ">=13.0.7, <14"

https://github.com/skorokithakis/catt/blob/master/pyproject.toml

joostlek commented 1 week ago

That means this is an issue in a custom component. Please raise this at their issue tracker.