Spotify Lovelace Card

I got it working but choosing sources they dont all show up same as the other spotify component

open a ticket on the repo: https://github.com/custom-cards/spotify-card/issues and add your browser details and the lovelace configuration you use for the card as well as the resource section where you add the spotify-card to lovelace (top one)

Hi, looks really nice! Why this setup:

  - type: module
    url: >-
      https://cdn.jsdelivr.net/gh/fondberg/spotify-card@master/src/spotify-card.js 

instead of this?

  - url: /customcards/lovelace/spotify-card.js
    type: module

Does it work with custom_updater?

Thanks!

You can download it and att it like that as well. I haven’t tried with the custom_updater, if you try please feedback the results

Ok, I will!

Unfortunately it doesn’t work with custom updater for me.

Do you know how I can add support for it? Also I moved the repo to custom-cards yesterday and haven’t had time to update.
https://cdn.jsdelivr.net/gh/custom-cards/spotify-card@master/src/spotify-card.js Is the new URL

Sorry but I don’t know but I’ll try it with the new URL.

As I see the updater gets data from the “custom_components.json” (or similar) at the others.

I read up on the code and docs for custom_updater https://github.com/custom-components/custom_updater/wiki/How-it-works and it seems it works only with downloaded cards.
I would say that adding the URL resource is far superior and you if you choose the master url (the one I pasted) you will always get the latest card.

https://cdn.jsdelivr.net/gh/custom-cards/spotify-card@master/src/spotify-card.js
so should I to add this URL for the Custom updater component in the configuration?
when I installed this card this form didn’t worked for me:

  • type: module
    url: >-
      https://cdn.jsdelivr.net/gh/fondberg/spotify-card@master/src/spotify-card.js 
    

I mean I had to download it manually. The custom updater can’t find it now.

What I mean is that the custom updater doesn’t give you anything extra if you use the URL I provided. The CU will try to help you upgrade custom things right? The URL will give you this without you having to do anything

I understand now, thank you!

I’m getting this error, I don’t know why?
Above is the Custom Card for Spotify and below is the HA Spotify component.

Here’s what I have in my Lovelace config.

resources:
  - type: module
    url: >-
      https://cdn.jsdelivr.net/gh/fondberg/spotify-card@master/src/spotify-card.js


cards:
  - type: 'custom:spotify-card'
    client_id: 1d1c1455f7e3411f**************35c

What is it that I could be doing wrong?

I think your lovelace UI is cached. Try to do a hard refresh of your browser.

It worked for me.
spotify-card-updater

1 Like

This is strange. It displays fine in Chrome, but not in Firefox or my mobile QtWebengine browser. There I get “Custom element doesn’t exist: spotify-card”

Works in Vivaldi too, but that is Chromium I think.

It is not so tested on other browsers. Can you try with the polyfill version?

https://cdn.jsdelivr.net/gh/custom-cards/spotify-card@polyfill/src/spotify-card.js

No, unfortunately the same. Works only in Chrome/Vivaldi.