Spotify Lovelace Card

@fondberg
Is featured and discover-weekly and the default the only playlist we can chose?

Is it possible to add:

  • albums
  • categories (this wuld rock ,all the categories)

Why i ask?
Well i would like to use the media browser function , but i cant select the output there.

What i’m trying to achieve (i went away from sonos to only cast devices):
A popup card showing a library , where i can chose from albums/ playlists/ categories
Chose an album or playlist and play it on the device i select…

  • able to chose from different spotify accounts

is that possible?

1 Like

@skank
I want exactly the same feature. I like the Media Library of Media Player card with spotify. But I can’t select the outpout.

So I search a solution to select an oupout with the media player card. Or to have the media library (artists, albums, tracks …) in the Spotify Lovelace Card.
I find this, but I can’t get the script to work : Media browser, Spotify, select output device?

I also was searching for a feature to have a list of playlist or album or whatever, so I found the following workaround: a set of Picure Card with tap action that play the playlist/album/…

  - type: picture
    image: 'https://i.scdn.co/image/xxxxxxxx'
    tap_action:
      action: call-service
      service: media_player.play_media
      service_data:
        entity_id: media_player.spotify
        media_content_type: playlist
        media_content_id: 'https://open.spotify.com/playlist/xxxxxxxxxxxxxx'

Here how it looks like using vertical and horzontal stack cards:

1 Like

Thats not what i was looking for , your idea is just a picture playing a playlist

How you get that? In my mini-media-player-card when using it with the media player spotify, i don’t get any media browser…

I didn’t do anything. When I add a media player card with media player spotify, I have this :
Capture d’écran 2021-02-19 174358

I don’t get it… can you show me the yaml code?
Do i maybe need a premium account?

Yes I have a premium spotify account. I juste integrate a basic media_player with spotify media and no particular options

I would also love the feature to browse the spotify library direct within the card. But as far as I know there is no possibility to include the media browser in custom cards.

I was pulling my hair because I couldn’t get the card to show until I realized I had to clear my browser’s cache and boom, it worked.
Lovelace dashboard : Add card > Manual > paste yaml below (with your spotify’s account name obviously)

type: 'custom:spotify-card'
limit: 10
spotify_entity: media_player.spotify_jerome
playlist_type: default
account: default

Hi All, thought i would try here first before creating a new thread.

I can’t seem to get my head around the Spotify integration and what i can do with it. I imagine theres something i’m missing.

I have spotify integration installed. Plus i have all my squeezeboxes about the house which i can group and play to etc… from airplay. I can also play my music from my LMS Server.

How can i set spotify to play a playlist to one of my devices?

Not sure I fully understand your reference to airplay here, but assuming you have an LMS Server running, you need to make sure it is set up with the Spotty plugin, if you haven’t done this already:

https://forums.slimdevices.com/showthread.php?112962-Announce-Spotty-4-4-more-personalised-content

With the Spotty plugin installed, you can select which of your Squeezebox players appears as a Spotify Connect device, which will then also make them available in Home Assistant through the Spotify media player, and so through this card as well.

1 Like

@iceflame, your code to hide various Spotify card elements works great, but I do have one question. Is there a way to hide the entire footer? I have all the controls hidden, but I’d rather not see the playback device or the Spotify logo in the lower right corner. I’m aiming for the simplicity of only clickable playlists and nothing else.

Thanks!

@fondberg?

Question about multiple Spotify accounts:

I have two Spotify accounts working in my Home Assistant setup, but I can’t get a playlist card to display for both accounts (only works for the main account).

That said, Spotify’s API is working successfully for both accounts to get playlists using the GET method, so is there a way to use ‘GET https://api.spotify.com/v1/users/{user_id}/playlists’ in the Lovelace config to display whatever playlist(s) I want to pull?

Something similar to this (which clearly doesn’t work, but just as an example of what I’m looking for)?

type: 'custom:spotify-card'
entity: media_player.spotify_zach
client_ID: XXXXXXXX
spotify_entity: media_player.spotify_zach
account: default
default_device: House Audio
display_style: grid
limit: 6
media_ID: GET https://api.spotify.com/v1/users/{user_id}/playlists)

did you solve this? I made to to hide the controls but I can’t make the speaker elector neither the outline (I already have those controls in the mini media player card)
can you share yaml for the Spotify card?

thanks in advance!

EDIT1:

Hide Border:

    style: |




      #content {
        border: 0px !important;


      }

EDIT 2
hide footer and border:

    style: |




      #content {
        border: 0px !important;
      }
      #footer {
        display: none !important;
      }
1 Like

I’ve been digging through the source code a bit, because I’m able to get a cheap sonos one. The Sonos integration supports playing media by passing an id (e.g. media_content_id: spotify:album:7GoZNNb7Yl74fpk8Z6I2cv). I’m assuming, that creating an implementation of ISpotcastConnector that invokes the sonos service should make it possible to start playback on a Sonos speaker…

1 Like

Thank you for developing this card! I am trying to find a way to turn on repeat for a track or a playlist. Has anyone been able to do this?

works perfect! very nice work!

one more question: Has anyone experience with controling spotify and heos with google assistant?