Play Spotify Shows in scripts? Is it possible?

I am trying to write an automation that automatically plays the german “Tagesschau” (daily news) as soon as I enter the kitchen in the morning. The thing is… It’s neither a playlist nor a single music piece and officially marked as show on spotify. I guess show is Spotify’s wording for podcasts. Does anyone know how to play a Spotify show with the media_player.play_media command?

Here is the URL to the show. There is always only 1 track available each day:
https://open.spotify.com/show/4QwUbrMJZ27DpjuYmN4Tun

Format as URI is: spotify:show:4QwUbrMJZ27DpjuYmN4Tun

I’ve tried to play this URI with a script without success. Script looks like this:

kitchen_tagesschau:
  alias: "Küche Tagesschau"
  sequence:
    - service: media_player.turn_on
      entity_id: media_player.spotify
    - service: media_player.select_source
      data:
        entity_id: media_player.spotify
        source: Kueche
    - service: media_player.play_media
      data:
        entity_id: media_player.spotify
        media_content_id: "spotify:show:4QwUbrMJZ27DpjuYmN4Tun"
        media_content_type: playlist

I think the problem is the media_content_type. I’ve tried changing it from playlist to music but it’s not working. Can anyone help out?

Just a thought: Could you maybe go another way and somehow automatically update a specific playlist with the latest Tagesschau when a new episode arrives?

Interesting thought :thinking:. But this would rather be some kind of workaround and not a real solution. Thinking about Spotify’s growing engagement in the podcast world it would be nice to just start a show without having to use a service like IFTTT. But I’ll keep your idea in mind.

Hi, I am interested too. Were you able to solve it (maybe without the workaround)?

Me three! 4 years later on this thread, but still relevant today. Spotify’s Podcasts are not easy to navigate on Home Assistant, even with the Spotify, Spotcast and mixed Spotify/Spotcast integrations unfortunately. I’m interested if anyone has come up with a solution or some best practices for Spot Pods :slight_smile:

Hey, I’ve never found a solution I was happy with. Still today it does not seem to be possible with native Hass service calls.

At home I am using Bose Soundtouch as media players. These media players have 6 preset buttons. If you save your spotify show on one of these 6 presets you are able to play the podcast/show with a service call like this:

    - service: media_player.play_media
      target:
        entity_id: media_player.soundtouch_kitchen
      data:
        media_content_id: 4
        media_content_type: PLAYLIST

The preset in this example is media_content_id: 4. This is of course not easily possible if you do not use Bose Soundtouch devices.

I just developed a new SoundTouchPlus custom component if you’re interested. It can easily be installed via HACS as well. More information can be found in this forum post.

It might be able to help with the select_source, as it supports both the source= and sourceAccount= values that you need to select a custom source. example:

service: media_player.select_source
data:
  source: PRODUCT:TV
target:
  entity_id: media_player.soundtouch_10
1 Like

@jones @bkh @tonivss I ran across this older thread again doing some research.

You can easily play Spotify show content in the SoundTouchPlus integration.

Note that a Premium-level membership is required in order to play Spotify content via SoundTouchPlus integration. You also have to add the Spotify account to your SoundTouch device via the SoundTouch App (just to get the source defined to the device).

I prefer playing Spotify content using the uri item type, as the location values appear to match what you see in the Spotify.com web-site url when playing content. For example, take a link from spotify.com such as Welcome to the New - Album by MercyMe | Spotify - the uri value to play the same content would be spotify:album:6vc9OTcyd3hyzabCmsdnwE. It seems to apply for all of the different content types (e.g. album, artist, track, playlist, episode, show, etc).

# play Spotify music service content - podcast, audiobook.
service: soundtouchplus.play_contentitem
data:
  entity_id: media_player.bose_st10_1
  name: K-Love On The Mic
  source: SPOTIFY
  source_account: yourSpotifyUserId
  location: 'spotify:show:39EidgdUzHLZ1Wab01NiGk'
  item_type: uri
  container_art: https://i.scdn.co/image/206f1a5d5e27e9516a5c0cdb06ee3ae079a78ac9
  is_presetable: true

You can also play Spotify content using the tracklisturl item type, and specifying the container url (e.g. “/playback/container/c3BvdGlmeTphcnRpc3Q6NkFQbThFanhPSFNZTTVCNGkzdlQzcQ==”) in the location value. The tracklisturl item type is what shows in the \nowPlaying service status under the ContentItem.location parameter.

More info and examples can be found on the SoundTouchPlus GitHub wiki page

Hope it helps!

1 Like