NFC Tag and Spotify

Hi guys… So I just stumbled into the wonderful world of NFC tags… Now I naturaly want it all do work with just a scan… :smiley:

But… Spotify seems to be a big showstopper for me…

Every evening when putting the son to bed, we turn off the light, turns on the heat, and puts a playlist on the google home speaker in his room…

So far I have the light/heat thing running fine with a tag… but what to do with Spotify…

I have added Spotify to my “Devices & Services” so I guess that should be running… But do I need to do something else for it to work on a named device… And what do I add it as? Right now the ligt goes as a “Call Service” the Heater as “Unit” but what should I do with the speeker?

I have the URL for the playlist, but for some reason It will not play it on that specific speeker…

Nice to knows:

Speeker name: media_player.kristoffer
Playlist Url : Spotify

I think you need spotcast, here’s my script to play a playlist on a specific speaker :

sequence:
  - service: spotcast.start
    data:
      entity_id: media_player.lounge_speaker
      uri: spotify:playlist:37i9dQZF1E35BRxiB9rsyO
      shuffle: true
      start_volume: 31
mode: single
alias: Lounge Spotify
icon: mdi:spotify

[edit] You obtain the playlist URI from the web player, there’s guides on google.

Should work without spotcast an is configurable via UI.

There you can click yourself to happiness

Here’s an example of the .yaml:

alias: Lullaby
description: ''
mode: single
trigger:
  - platform: tag
    tag_id: YOUR_TAG
condition: []
action:
  - service: media_player.play_media
    target:
      entity_id: media_player.YOUR_PLAYER
    data:
      media_content_id: >-
        spotify:/YOUR_CONTENT_ID
      media_content_type: spotify://playlist
    metadata:
      title: PLAYLIST_TITLE
      thumbnail: THUMBNAIL_URL
      media_class: playlist
      children_media_class: track
      navigateIds:
        - {}
        - media_content_type: spotify://library
          media_content_id: YOUR_CONTEN_ID
        - media_content_type: spotify://current_user_playlists
          media_content_id: YOUR_CONTENT_ID
        - media_content_type: spotify://playlist
          media_content_id: >-
            YOUR_CONTENT_ID

Thanks both of you… Sadly I did not get any of the things to work…

If I install Spotcast, no sound are played from my Google home… ?

And if I use your solution @ RodgerDodger (took me a while to figure out that it was a complete automation yaml file you had made… :smiley: ) The speaker makes a “beep - I have recived a command - Sound” but nothing playes, but the speaker is activted in some way…

Is the problem that it is a Google speaker? some ppl. have talked about that… ?

Sorry, but you’re right.

The way I described seems to only possible with SONOS and not with Google speakers as I just tried it with one of my Nest Minis.