I am using the Spotify integration for a couple of years without issues and tried to add a second account to it today.
Adding the account went easy, but it is not working properly somehow. The new account has no service and entity. So, basically it is nothing.
I have tried a couple of things:
At first I added the 2nd account to the 1st as dictated on the integration page.
Then I tried it the other way around. So I configured a new app from the developers page of the 2nd account and added the 1st account as a user to this one. I deleted the original App Credentials from HA and added the new one. I added both Spotify accounts with the same result: the new account (which now is the account where the app is configured on) has still no service and entity en the old one works perfectly fine.
When I removed all config from HA and start over new with the 2nd Spotify account only, it still had no service and entities.
I do see some errors in the log:
Logger: homeassistant.components.media_player
Source: components/spotify/media_player.py:98
Integration: Media player (documentation, issues)
First occurred: 2:06:21 PM (11 occurrences)
Last logged: 3:17:08 PMspotify: Error on device update!
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/spotify/media_player.py”, line 89, in wrapper
result = func(self, *args, **kwargs)
File “/usr/src/homeassistant/homeassistant/components/spotify/media_player.py”, line 399, in update
self._playlist = self.data.client.playlist(current[“context”][“uri”])
File “/usr/local/lib/python3.10/site-packages/spotipy/client.py”, line 650, in playlist
plid = self._get_id(“playlist”, playlist_id)
File “/usr/local/lib/python3.10/site-packages/spotipy/client.py”, line 1974, in _get_id
raise SpotifyException(400, -1, “Unexpected Spotify URI type.”)
spotipy.exceptions.SpotifyException: http status: 400, code:-1 - Unexpected Spotify URI type., reason: NoneThe above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 521, in _async_add_entity
await entity.async_device_update(warning=False)
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 784, in async_device_update
await coro
File “/usr/local/lib/python3.10/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/spotify/media_player.py”, line 98, in wrapper
raise HomeAssistantError(f"Spotify error: {exc.reason}") from exc
homeassistant.exceptions.HomeAssistantError: Spotify error: None
It looks like the line ‘Unexpected Spotify URI type’ is what I should focus on, but I do not know what it means.
Does anybody know what is going on?
Thank you!