Spotify Lovelace Card

media_player
lovelace
Tags: #<Tag:0x00007fd078ba86a0> #<Tag:0x00007fd078ba8330>

#21

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


#22

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)


#23

Hi, looks really nice! Why this setup:

  - type: module
    url: >-
      https://cdn.jsdelivr.net/gh/fondberg/[email protected]/src/spotify-card.js 

instead of this?

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

Does it work with custom_updater?

Thanks!


#24

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


#25

Ok, I will!


#26

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


#27

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/[email protected]/src/spotify-card.js Is the new URL


#28

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


#29

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


#30

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.


#31

https://cdn.jsdelivr.net/gh/custom-cards/[email protected]/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/[email protected]/src/spotify-card.js 
    

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


#32

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


#33

I understand now, thank you!


#34

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/[email protected]/src/spotify-card.js


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

What is it that I could be doing wrong?


#35

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


#36

It worked for me.
spotify-card-updater


#37

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”


#38

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


#39

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

https://cdn.jsdelivr.net/gh/custom-cards/[email protected]/src/spotify-card.js

#40

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