That looks awesome! Could you publish the yaml code here? Best regards
Stefan
@Richi No yaml really. Custom card that will be released via HACS shortly. Needs some more tweaking but hoping to release early next week.
Looks awesome. Exactly what the integration needs… you’re going to be a hero to many of us!
Can you please let us know when it will be available for download?
Best regards
I’m hoping someone can help me. I’m having real problems getting SpotifyPlus (and HA more generally) to place nicely with the Spotify app installed on my Android tablet.
I use the tablet for may main HA dashboard in my kitchen. I also have the Spotify app on the tablet so I can play music. I would like to be able to control the Spotify App through my home assistant dashboard, but at the moment I just can’t get them to coexist.
The main issue is that Spotify just keeps pausing playback.
I have checked all the battery settings etc that should allow the app to keep running in the background but:
- If I start Spotify through the app, and then switch to HA, playback pauses.
- If I restart playback through SpotifyPlus, it plays for a minute or two, and then pauses.
- If I start playback through HA and then switch to the Spotify app, it pauses.
It is very annoying.
Is it simply not possible to have SpotifyPlus and the Spotify app on the same device? SpotifyPlus can’t output audio on its own, so I need the app in order to have a Spotify Connect player to output to/control.
Any assistance would be gratefully received.
@MFrost
Have you tried using the SpotifyPlus Card user-interface? It allows you to control the player, manage your Spotify favorites, as well as search the Spotify catalog.
I’m not sure why the player stops after a minute or two.
Questions:
- Are you sharing a Spotify account with someone else in the home maybe?
- Are you using a Spotify Premium account?
Very alpha
Hi,
Thanks for coming back to me.
I have the Spotify Plus card. I am hoping to use it to control the Spotify app (or rather the Spotify connect player that the app creates) on the tablet. At the moment it isn’t really usable because of the constant unexpected pausing.
I’m using a Spotify premium account, which is not being shared by anyone.
I’ve scaled back my ambitions from being able to do everything through my HA dashboard to just trying to get the app and Spotifyplus to coexist.
If I can get basic playback working, then I’ll look again at using the SpotifyPlus card.
@MFrost
You mentioned in your original post:
- If I start Spotify through the app, and then switch to HA, playback pauses.
- If I restart playback through SpotifyPlus, it plays for a minute or two, and then pauses.
- If I start playback through HA and then switch to the Spotify app, it pauses.
This almost sounds like a network bandwidth issue, instead of a Spotify authorization token issue as I had originally thought. If it were a token related issue, then the play would probably stop after @60 minutes / 1 hour of play (due to token expiration and not renewing).
What happens if you start playback via HA using SpotifyPlus Card by itself? e.g. do not start the Spotify App, just purely control it via HA using SpotifyPlus Card.
I have never had problems controlling the Spotify player using multiple applications. The only issue you run into there is latency, in that your Spotify App player changes will not be reflected right away in the HA player due to the polling value. For example, if you skip to next track in the Spotify App it will immediately display the next tracks’ cover art; in HA, the cover art will not change for up to 30 seconds due to the HA polling interval. Note that SpotifyPlus can change the polling interval to 4 seconds if required to make the changes like be detected in a more timely manner.
@thlucas Any suggestions on how to clear the queue? I know Spotify hasn’t and doesn’t plan to expose those features.
I’m trying to build a radio/suggested tracks feature for Spotify Browser using last.fm and potentially AI. The problem I’m finding is when I hit my radio button, it fills the queue with 20-30 suggested tracks. If half way through I want to start another radio, it adds the new tracks to the bottom of the queue which normally we would want. However I want to start fresh.
@bdubsw
You are correct, in that there is no “Clear Users Queue” endpoint in the Spotify Web API specification. There have been numerous requests on their forum to add that feature, but no progress.
I have ran into instances in the past where you could start play of a single track via Player Media Play Tracks, which then clears the queue. It may behave differently now that we no longer have the Spotify Web Player authorization token, so not sure if it’s changed or not.
It’s not pretty, but you could maybe try something like this:
- call
player_media_play_tracksservice to start a single track (clears the queue). - call
player_media_pauseto pause play. - call
player_media_play_tracksservice to start multiple tracks (reloads the queue).
Helloo ![]()
First, thank you for this great integration. I am able to connect and play music on certain devices.
However, my main goal is to play my liked songs to a HifiBerry OS device running on a rpi3. Aaaannnd… I’m stuck. I tried many things :
- When I call spotifyplus.get_spotify_connect_devices i see my device but the param IsInDeviceList is false
- When I tried to play songs, I have an error “device not found”, or “not found”
Note : I have librespot credentials with the token, I have a turn on script that does:
- action: spotifyplus.get_spotify_connect_device
data:
entity_id: media_player.spotifyplus_nico_l
verify_timeout: 10
activate_device: true
delay: 10
device_value: [id]
- action: spotifyplus.player_transfer_playback
data:
entity_id: media_player.spotifyplus_nico_l
device_id: [id]
play: true
refresh_device_list: true
But it doesn’t works neither ![]()
If, in my phone, I click on the player in the list, then, everything works great for a moment, and after few hours, I’m stuck again.
Do you have an idea ?
(the goal is to launch music in the morning for waking up :D)
Thank you
I am not familiar with HifiBerry OS, but a quick chatGPT search yielded the following:
No headless auto-play
You cannot:
- Auto-start Spotify playback on boot
- Resume last Spotify session after reboot
That tells me that the HifiBerry cannot resume play by simply transferring playback to the device (which is what the player_transfer_playback service does).
You might try the following, which will transfer playback AND start play of your track favorites (with shuffle on). This one action will replace both of the actions in your example (get_spotify_connect_device and player_transfer_playback).
- action: spotifyplus.player_media_play_track_favorites
data:
entity_id: media_player.spotifyplus_nico_l
device_id: [id]
shuffle: true
Hello
thank you for your help. I tried but it didn’t work, so I went for an other solution:
- I removed HifiberryOS and use a raspbian lite OS instead
- and installed go-librespot
Now everything is working well ![]()
@thlucas when using the tokengen I get the following error could you help me?
** Exception: SAM1001E - Spotify Web API returned an error status while processing the “SetAuthTokenAuthorizationCodePKCE” method.
Status: 429 - Too Many Requests
Message: "{
“error”: {
“status”: 429,
“message”: “API rate limit exceeded”
@DGerding-2307
The “API rate limit exceeded” indicates it is making too many requests to the Spotify API. I have never heard of anyone experiencing this error using the integration or the AuthTokenGenerator process. This leads me to believe it’s either a temporary condition with the Spotify authorization servers, or something in your Spotify Developer App settings is not configured properly.
What do you have specified for the redirect uris in your Spotify Developer App?
@thlucas i have this uri as redirect
@DGerding-2307
Your Spotify Developer App needs to contain the following redirect uri values:
https://my.home-assistant.io/redirect/oauth
http://127.0.0.1:8080/
The http://127.0.0.1:8080/ value is required for the AuthTokenGenerator process.
Also note that the https://my.home-assistant.io/redirect/oauth does NOT contain an ending slash.
Hi,
I have exactly the same problem with the message “API rate limit exceeded”. The redirect URIs in the Spotify Developer settings is as shown above.



