@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.