SpotifyPlus Integration

Im posting after spending around 3 hours trying to self resolve. I first installed the integration, followed by the card, and all seemed to go ok. If I go into the integration via the entity, I can turn on an alexa device and control spotify.

However, when I add the SpotifyPlus Card to my dashboard, it simply displays a message that says

“welcome to the spotifyPlus media player card. Start by configuring a media player entity.”

I’m lost…and i must be missing somthing, but I just cant work it out.

Can ayone tell me whys its displaying the message, rather than the spotify controls?

@hamd01
After Adding the SpotifyPlus Card via card picker, you have to configure which SpotifyPlus Integration media player will be used for the card; until you do so, it will just display the Welcome to the SpotifyPlus media player card ... message.

The SpotifyPlus Integration media player can be selected in the SpotifyPlus Card General Configuration Editor - it looks like this:

1 Like

FYI - just released a new version of the SpotifyPlus integration

Be sure to check out the SpotifyPlus Card Dashboard as well.

[ 1.0.97 ] - 2025/02/22

  • Updated SpotifyClient methods to restore functions that were previously deprecated by the Spotify development team. Note that the Spotify Web Player Authentication Setup must be enabled to use these specific functions; if not enabled, the functions will raise a deprecated exception. The following methods were restored: GetArtistRelatedArtists, GetTrackRecommendations, GetTracksAudioFeatures, GetFeaturedPlaylists, GetCategoryPlaylists, GetGenres, GetPlaylist, GetPlaylistFavorites, GetPlaylistItems.
  • Updated underlying spotifywebapiPython package requirement to version 1.0.174.
1 Like

@Squizz

I was able to restore this functionality with the 1.0.97 release. You just have to setup the Spotify Web Player Authentication credentials first. This will utilize an elevated access token to call the service.

Hope it helps!

1 Like

@Diegocampy
Just checking in on how the SpotifyPlus Integration is behaving on your system. Any more HA UI lock up / freeze scenarios?

Please let me know when you get a minute.

I was reviewing older posts in this thread for another issue, and ran across your comment about wanting to display the Spotify Queue in a dashboard. I put together a Queue Info List Dashboard example for another user, and thought I would make you aware.

It displays the Spotify Queue Info list for a given SpotifyPlus media player in your dashboard, and allows you to select a queue item for play on the media player by tapping on a track image.

Hope it helps!

all good, but I had not yet reactivated all the automations. I think the problem could be one of my automations that activates spotify plus, every time spotify standard is activated. This is to allow spotify plus to be updated when a specific google home of mine is activated, in order to automatically transfer the music to my bose. I will try to reactivate those automations, and if I have new home assistant blocks, I will come back here to update you

1 Like

thank you, perfect solution!

1 Like

Everything is fine, I confirm that everything is working, even though I haven’t forced an automation to always keep Spotify Plus active. Would it make sense to do so?

To be honest, I don’t use the card much, even though I installed it. I’m more interested in transferring music from a Google Home device to the Bose.

I created an automation to do this, which works well, but I have only one issue.

The automation allows me to transfer music when either the BOSE or GOOGLE HOME CAMERA turns on. If Google Home Camera is playing and Spotify Diegocampy (I have two different accounts, one with Spotify and one with Spotify Plus) is active, then the music is transferred to the Bose. This way, I can have the music automatically play on the Bose using voice commands. Even if music is already playing and I request a new song by voice in the Camera, it will start on Google Home Camera and then get transferred to the Bose.

This works well, but I have one issue: if Diegocampy Spotify is active because it’s playing on another device in the house, or even on my phone while I’m away, and someone tries to play music in the Camera, the conditions are met, and my Spotify account’s music will be transferred to the Bose.

I don’t know how to solve this issue. I should add a condition to check if Spotify or Spotify Plus is actually playing on Google Home Camera before proceeding. Is that possible?

alias: "Musica da Camera a Bose "
description: ""
triggers:
  - device_id: ded78f524bba3ec128067a95c0115ca6
    domain: media_player
    entity_id: 827a688474cb6bbd9c0df0430c441d95
    type: turned_on
    trigger: device
  - device_id: 46b6748eefa042d58fe5578175e4ca81
    domain: media_player
    entity_id: d44016681cee8ab6aec8bffd0ed850f8
    type: playing
    trigger: device
conditions:
  - condition: device
    device_id: 46b6748eefa042d58fe5578175e4ca81
    domain: media_player
    entity_id: d44016681cee8ab6aec8bffd0ed850f8
    type: is_playing
  - condition: state
    entity_id: media_player.spotify_diegocampy
    state: playing
    alias: Spotify Diegocampy in funzione
actions:
  - action: script.bose_spotify_diegocampy
    metadata: {}
    data: {}
  - action: notify.mobile_app_pixel_8_pro
    metadata: {}
    data:
      message: Musica da Camera a Bose
mode: restart
1 Like

Do you mean adding a condition check to see if SpotifyPlus is playing on a certain device (e.g. source)?

conditions:
  - condition: state
    entity_id: media_player.spotifyplus_todd_l
    attribute: source
    state: Bose-ST10-1
1 Like

Yes @thlucas , it would be perfect but my Spotify Plus entities are always off until I turn them on, so in my automation it doesn’t work. Is it possible to set the automatic switch on when playing music?Just like it happens with the Spotify standard entity.

1 Like

@Diegocampy
Check out the Always On configuration option - added with v1.0.85

1 Like

Question for @thlucas or others.

I’d like to press a button and play Discover Weekly on my group of 3 Sonos devices in the living room. I have a Sonos Playbar and Sonos One speakers. I have not installed the SpotifyPlus integration, but was this broken by Spotify? I looked at the wiki link and it says to see Spotify Web Player Authentication Setup but it’s not clear if this feature still works?

I’m assuming that the playlist ID changes each week, so something would first need to look up the ID for Discover Weekly by name. Also, I noticed the Sonos app lets me make this a favorite, but it never updates it, so that doesn’t help.

Thanks and I appreciate any suggestions!

@jheirtzler
I believe the Spotify Weekly playlist id remains the same, but not sure on that. I know that the Daily Mix n entries stay the same, so assume the same for the Weekly entry.

This feature WAS previously broken by Spotify and their deprecated functions event on 11/27/2024. I was able to restore the functionality just this week, but it requires that you complete the Spotify Web Player Authentication Setup in order to use the elevated access token required to call the (previously deprecated) function(s).

Note that all of the above requires the SpotifyPlus Integration; HA Spotify integration does not support these functions.

As for the grouping functions, you would need to create a Spotify Connect group for the 3 different Sonos speakers; there is no grouping functionality in the SpotifyPlus integration. That is all handled at the Sonos device level.

Sonos favorites are also a native Sonos device function, not to be confused with Spotify Playlist favorites; there is no Sonos favorites functionality in the SpotifyPlus integration, only Spotify favorites are supported. You could add the spotify Weekly to your Spotify Playlist favorites if you wish.

Example service call to play the Spotify Discover Weekly:

action: spotifyplus.player_media_play_context
data:
  entity_id: media_player.spotifyplus_todd_l
  context_uri: spotify:playlist:37i9dQZEVXcTh0pBxo9pZe
  device_id: Office

Hope it helps!

Thanks for the fast response!

My speakers were grouped during setup with the Sonos app, so perhaps what I call a “group” is better called a “room” in the Sonos world because the pairing of speakers is happening at setup time.

If the playlist ID changes weekly, ChatGPT thinks something like this could query the playlist ID based on the name (is this a hallucination?) which it sounds like would need the elevated access token.

alias: Play Discover Weekly on Sonos
sequence:
  - service: spotifyplus.browse_playlists
    data:
      entity_id: media_player.spotify
    response_variable: playlists_data

  - variables:
      discover_weekly_uri: >
        {{ playlists_data | selectattr('name', 'eq', 'Discover Weekly') | map(attribute='uri') | first }}

  - service: spotifyplus.player_media_play_context
    data:
      entity_id: media_player.spotify
      media_content_id: "{{ discover_weekly_uri }}"
      device_name: "Your Sonos Speaker"
mode: single

When I used Alexa, it was fairly straightforward as a voice command “Alexa, play Discover weekly on group den” so Amazon has (private?) API access.

Not sure where ChatGPT picked up the browse_playlists, but that service name does not exist.

Your best bet would be to call get_category_playlists for the “Made For You” category_id (e.g. 0JQ5DAt0tbjZptfcdMSKl3); that category id is definitely static, and will not change. Then parse the Discover Weekly URI value, and call player_media_play_context to start play on the specified Spotify Connect device (e.g. group) name.

Example (tested, and works):

alias: SpotifyPlus Play Discover Weekly
description: "Retrieves Spotify Weekly Playlist ID from Made For You category list and starts play on the specified device id."
sequence:
  - action: spotifyplus.get_category_playlists
    data:
      entity_id: media_player.spotifyplus_todd_l
      category_id: 0JQ5DAt0tbjZptfcdMSKl3
      limit_total: 100
    response_variable: playlists_data
  - variables:
      discover_weekly_uri: >
        {{ playlists_data['result']['items'] | selectattr('name', 'eq', 'Discover Weekly') | map(attribute='uri') | first }}
  - action: spotifyplus.player_media_play_context
    data:
      entity_id: media_player.spotifyplus_todd_l
      context_uri: "{{ discover_weekly_uri }}"
      device_id: Office
mode: single
1 Like

Thanks, I hadn’t realized that. I tried, but maybe it’s the running automation itself that’s starting to eat up RAM. This graph has the blue line exactly from when I activated the always-on mode.


Do you think it could be related? Do you consider it normal?
For the automation, I solved it by using the condition in the same way but directly with the official Spotify account.

@Diegocampy
I would need to see more data over a longer time period to determine if it’s “normal” or not. Also, what is your refresh rate set to in the SpotifyPlus configuration? Default is 30 seconds; if set lower than that, then it will make more calls in a 1 hour period.

Also, check to make sure you don’t have any SmartInspect traces running (ensure Enabled = False in the <config>/smartinspect.cfg file if you have one). This can consume memory and disk space if enabled.

I am currently running some tests myself to check for similar behavior, though I don’t have your kinds of scripts running. Thus far, everything is normal RAM (and CPU) usage for me.

1 Like

@Diegocampy
My testing does not show a notable RAM increase when switching SpotifyPlus to “Always On” functionality:

I made the configuration change (e.g. set “Always On” to true) at 07:40 am, with no music playing. The RAM usage went from 20.4% to 20.6% (on average), which is a 0.2% increase and (I assume) normal usage.

I started continuously playing music at 8:40 am, again with no noticeable increase.

You might double check your automations.

Hope it helps!

1 Like

Suggestions on how to make speakers announce the name of the episode that starts playing? The plan is to have the kids scan a NFC tag that launches a show with fairy tales, enables shuffle, play a random episode, speak the name of the episode and then play the episode. I tried with set shuffle mode, play context, wait for 1 seconds, get episode action, tts.cloud_say of variable.result.name, wait 2 seconds and then play context with variable.result.show.uri. It sometimes works but it’s slow and not very smooth. And sometimes it plays the wrong episode at the last step. Ideas for a better approach?