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
74.19k stars 31.16k forks source link

Spotify Integration Can't Play Playlists (Media Browse) or Pull Now Playing info if Playing within Playlist #48258

Closed mryli closed 3 years ago

mryli commented 3 years ago

The problem

So setup is as follows. Fresh Install of Home assistant New Spotify Dev application with all the relevant redirect URLs.

When using another device (iPhone app or Desktop app) to play individual song. (going via album or liked songs) the Spotify integration populates the media_player entity with what is currently playing, artwork, metadata play pause & volume controls work great as expected. When selecting a playlist, ( from iPhone app or Desktop app) featured or personal (going via playlists menu) the integration doesn't update with metadata or playback info. Controls however still work. Example. A playlist is playing, the entity is idle when pressing the play button the media pauses when pressed play again the media resumes. There is no indication from the card or entity data that anything has changed.

What is version of Home Assistant Core has the issue?

2021.3.4

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

Link to integration documentation on our website

https://www.home-assistant.io/integrations/spotify/

Example YAML snippet

# Put your YAML below this line
spotify:
  client_id: !secret spotifyclient_id
  client_secret: !secret spotifyclient_secret

Anything in the logs that might be useful for us?

# Put your logs below this line

image

probot-home-assistant[bot] commented 3 years ago

Hey there @frenck, mind taking a look at this issue as its been labeled with an integration (spotify) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

stnokott commented 3 years ago

Can confirm this and maybe add some more info:

Relevant log entries in Home Assistant look as follows when playing recommended songs from a playlist:

This also results in the unavailable state for the entity: image

This might be an issue in Spotipy itself, so I'll have a look at that repo too. EDIT: no issue over at Spotipy seems to mention this, I will try to reproduce using Spotipy only (without Home Assistant instance) later today.

mryli commented 3 years ago

Hi, removing all Spotify integrations, updating HA to 2021.5.0 then re-adding the integrations with new Api keys & codes resolved any issues i had previously. Pretty sure you dont need to remove or change the integrations but i did just to be sure. @stnokott Maybe its worth trying that and closing this ticket if it fixes it for you.

stnokott commented 3 years ago

removing all Spotify integrations, updating HA to 2021.5.0 then re-adding the integrations with new Api keys & codes [...] @stnokott Maybe its worth trying that and closing this ticket if it fixes it for you.

Unfortunately, removing all Spotify integrations, recreating a Spotify application and re-adding it to Home Assistant didn't change anything, the issue mentioned here persists for me.

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.