core: Spotify does not support device after HA update
The problem
I have a simple script that plays a Spotify playlist on speakers. Here is a snippet:
- service: media_player.select_source
data:
source: Alwin's Home
target:
entity_id: media_player.spotify_alwin
- service: media_player.volume_set
data:
volume_level: 0.5
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: media_player.play_media
target:
entity_id: media_player.spotify_alwin
data:
media_content_id: spotify:playlist:37i9dQZF1DX2vYju3i0lNX
media_content_type: spotify://playlist
metadata: {…}
This script worked fine until I updated HA and HA Core OS to the new version. Only the first step which selects the source works. For the steps to set volume and to play the playlist I get an error saying “ Entity media_player.spotify_alwin does not support this service.”.
Additionally, I cannot select my playlist in the UI anymore. It just says “ Media player does not support browsing media.”.
I found a related exception in the HA logs:
Logger: homeassistant.components.websocket_api.http.connection
Source: helpers/service.py:851
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 22:16:22 (6 occurrences)
Last logged: 23:00:08
[547355032768] Entity media_player.spotify_alwin does not support this service.
[547355028800] Entity media_player.spotify_alwin does not support this service.
[547441066944] Entity media_player.spotify_alwin does not support this service.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 226, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 607, in _service_handler
response = await self._async_start_run(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 566, in _async_start_run
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 596, in _async_run
return await self.script.async_run(script_vars, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1569, in async_run
return await asyncio.shield(run.async_run())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action
return long_task.result()
^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 851, in entity_service_call
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity media_player.spotify_alwin does not support this service.
What version of Home Assistant Core has the issue?
core-2023.8.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Spotify Integration
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
See description.
Anything in the logs that might be useful for us?
See description.
Additional information
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (8 by maintainers)
Right, tried my theory of the bug on my own machine and it was not what I expected so I am going to close this again