@Diegocampy
Make sure you do a “pip install spotifywebapipython -U” to upgrade the spotifywebapipython library. Also ensure you activate the virtual environment before you run the pip command.
Update: resolved!
I’d like to report that the command line didn’t work for me; Gemini suggested a similar line, which did work. However.
(env) C:\tokengen>pip install spotifywebapipython - U
ERROR: Invalid requirement: '-': Expected package name at the start of dependency specifier
-
^
(env) C:\tokengen>pip install --upgrade spotifywebapipython
I’m now stuck at another point, which I’ll explain next.
Running the script recognizes my username, but it gives me some issues:
(env) C:\tokengen>python AuthTokenGenerator.py
** Exception: name 'Diegocampy' is not defined
(env) C:\tokengen>python AuthTokenGenerator.py
** Exception: name 'diegocampy' is not defined
(env) C:\tokengen>
I tried changing my username in the file to both lowercase and uppercase, but the result remains the same.
My mistake—I had mistakenly entered “diegocampy” in the script. I managed to fix it, and everything is working again with both accounts! Perhaps the token update every 55 minutes isn’t even necessary; maybe it wasn’t working anymore because the token was missing, and I hadn’t noticed.
Hello @thlucas, I’m trying to make 2 button card for increasing and decreasing the volume of the active device playing, usually with a media player I use this template:
- action: media_player.volume_set
data:
entity_id: media_player.stereo
volume_level: "{{ states.media_player.stereo.attributes.volume_level - 0.05 }}"
but with SpotifyPlus:
- action: spotifyplus.player_set_volume_level
data:
entity_id: media_player.spotifyplus
volume_level: "{{ states.media_player.spotifyplus.attributes.volume_level - 0.1 }}"
It seems I can’t use the same template… Is there any workaround?
@Sofa_Surfer
Sorry for the late reply; I did not get a notification on this for some reason.
Just use the same media_player.volume_set call; make sure you use the full SpotifyPlus entity name in the template:
states.media_player.spotifyplus_xxxx.attributes.volume_level
You can also use the volume up / down calls to do the same thing without the Jinja template. Just use the volume_set_step call to set the step amount first. The following sets the step amount to 20 %, which causes the volume_up and volume_down calls to vary the volume amount by 20%. The default step amount is 10% I believe.
action: spotifyplus.volume_set_step
data:
entity_id: media_player.spotifyplus_john_s
level: 0.20
action: media_player.volume_up
data:
entity_id: media_player.spotifyplus_john_s
action: media_player.volume_down
data:
entity_id: media_player.spotifyplus_john_s
Thank you Todd, I’ll try this evening!
Hi @thlucas trying to get a playlist to play in my automation but getting: Error running action
Unsupported uri kind: playlist_v2
@Cmorgs13
Welcome to the community!
Can you post your automation step that is issuing the play call?
When you post, make sure you put the text in a block of slanted ticks, like so:
```
service call:
line 2 with 2 leading spaces.
```
It will cause it to look like this in the post (preserves spacing, which is important for YAML / automations).
service call:
line 2 with 2 leading spaces.
action: spotifyplus.player_media_play_tracks
data:
entity_id: media_player.spotifyplus_carly_morgan
uris: spotify:playlist:7v5CcDIhC3zwVS9bVTNW2w
shuffle: true
enabled: true
@Cmorgs13
You want the play context service for playlists, albums, artists, and shows. Play tracks is used to play tracks and episodes. Example:
action: spotifyplus.player_media_play_context
data:
entity_id: media_player.spotifyplus_carly_morgan
context_uri: spotify:playlist:7v5CcDIhC3zwVS9bVTNW2w
shuffle: true
enabled: true
Thank you so much!!
FYI - just released a new version of the SpotifyPlus Integration.
This release combines 18 of the supported voice assistant intents into 2 new intents (16 intents removed). Apparently, there are some limitations in the openAI API that constrains the number of available intent “tool slots” to 128.
The plan is to try and combine other intents as well, without losing functionality. Will keep you posted as that effort continues.
[ 1.0.182 ] - 2025/11/05
- Added voice assist intent:
SpotifyPlusFavoriteAddRemove. This replaces 14 other intents (see below). - Added voice assist intent:
SpotifyPlusGetNowPlayingInfo. This replaces 4 other intents (see below). - Removed 14 voice assist intents related to favorite processing:
SpotifyPlusFavoriteAlbumAdd,SpotifyPlusFavoriteAlbumRemove,SpotifyPlusFavoriteArtistAdd,SpotifyPlusFavoriteArtistRemove,SpotifyPlusFavoriteAudiobookAdd,SpotifyPlusFavoriteAudiobookRemove,SpotifyPlusFavoritePlaylistAdd,SpotifyPlusFavoritePlaylistRemove,SpotifyPlusFavoritePodcastAdd,SpotifyPlusFavoritePodcastRemove,SpotifyPlusFavoritePodcastEpisodeAdd,SpotifyPlusFavoritePodcastEpisodeRemove,SpotifyPlusFavoriteTrackAdd,SpotifyPlusFavoriteTrackRemove; manual removal fromconfig/custom_sentencesfolder is required. - Removed 4 voice assist intents related to nowplaying information processing:
SpotifyPlusNowPlayingInfoArtistBio,SpotifyPlusNowPlayingInfoAudiobook,SpotifyPlusNowPlayingInfoPodcast,SpotifyPlusNowPlayingInfoTrack; manual removal fromconfig/custom_sentencesfolder is required.
FYI - just released a new version of the SpotifyPlus Integration.
This release combines 11 of the supported voice assistant intents into 2 new intents (9 intents removed). This brings the total number of intents in the SpotifyPlus integration to 17.
[ 1.0.183 ] - 2025/11/06
- Added voice assist intent:
SpotifyPlusPlayerDeckControl. This replaces 5 other intents (see below). - Removed 5 voice assist intents related to player deck control:
SpotifyPlusPlayerMediaPause,SpotifyPlusPlayerMediaResume,SpotifyPlusPlayerMediaSkipNext,SpotifyPlusPlayerMediaSkipPrevious,SpotifyPlusPlayerMediaSkipStart; manual removal fromconfig/custom_sentencesfolder is required. - Added voice assist intent:
SpotifyPlusPlayerVolumeControl. This replaces 6 other intents (see below). - Removed 6 voice assist intents related to player volume control:
SpotifyPlusPlayerSetVolumeLevel,SpotifyPlusVolumeDown,SpotifyPlusVolumeMuteOff,SpotifyPlusVolumeMuteOn,SpotifyPlusVolumeUp,SpotifyPlusVolumeSetStep; manual removal fromconfig/custom_sentencesfolder is required.
I’m sure this has been mentioned already since this is a long thread, but is there a way to change the background when it’s idle from showing the Spotify logo?
@BuilderOKC
Check out the custom image urls wiki topic, specifically the playerOffBackground and playerIdleBackground options.
Much appreciated
@brix29 @NathanCu
FYI - just released a new version of the SpotifyPlus Integration.
This release combines 8 of the supported voice assistant intents into 1 new intent (7 intents removed). This brings the total number of intents in the SpotifyPlus integration to 10 (from the original 42).
[ 1.0.184 ] - 2025/11/11
- Added voice assist intent:
SpotifyPlusSearchPlayContent. This replaces 8 other intents (see below). - Removed 8 voice assist intents related to searching for and playing content:
SpotifyPlusPlayFavoriteTracks,SpotifyPlusSearchPlayArtistAlbum,SpotifyPlusSearchPlayArtistTrack,SpotifyPlusSearchPlayAudiobook,SpotifyPlusSearchPlayPlaylist,SpotifyPlusSearchPlayPodcast,SpotifyPlusSearchPlayPodcastEpisode,SpotifyPlusSearchPlayTrack; manual removal fromconfig/custom_sentencesfolder is required.
Hi, thanks much for the great work. Most times in automation to play a playlist, I get this error message and I have to manually set the default device in spotifyplus configuration. Am I missing something or this can be set as a part of automation itself?
Perform action ‘Media player: Play media’ on Spotifyplus-Sky
Executed: November 12, 2025 at 7:41:31 PM
Error: There is no active Spotify player device, and a default player device was not configured.
Result:
params:
domain: media_player
service: play_media
service_data:
enqueue: replace
entity_id:
- media_player.spotifyplus_sky
media_content_type: playlist
media_content_id: spotify:playlist:2xBDUrZF0wn2puzO38cDru
target:
entity_id:
- media_player.spotifyplus_sky
running_script: false
@sun.sky4u
It appears you are using the HA media player play_media service to start the playlist, which will work (IF there is already an active device) but does not support the SpotifyPlus specific device parameter. In the case presented, there is no active device so the call fails.
A couple of ways around this (option 1 recommended. more options):
-
use the SpotifyPlus Player Media Play Service call instead, which supports the device (and other) parameters that the HA
play_mediacall does not.
Example - start the playlist on the “Nest Audio 01” device, enabling shuffle mode.action: spotifyplus.player_media_play_context data: entity_id: media_player.spotifyplus_sky context_uri: spotify:playlist:2xBDUrZF0wn2puzO38cDru device_id: "Nest Audio 01" shuffle: true -
Continue to use the HA
play_mediaservice, but set the default device in the SpotifyPlus integration configuration options.
Thanks much for the revert. I have updated the automation with the preferred way suggested. Thanks again.

