Spotify Lovelace Card

I just tried and it works for me

Chromecast devices playback with spotcast works again with version 3.0.0. it requires new configuration so be sure to read its README

No, only spotify connect devices and chromecast devices (with spotcast)

After deleting all cookies from Firefox and trying again, it’s still not working but the first time I try the authentication I’ve noticed it tries to redirect to my local https (I’m using HA in my localhost with http) and I get the following error:

Secure Connection Failed

A Secure Connection Failed error page will include a description of the error, an option to report the error to Mozilla and a Try Again button. There is no option to add a security exception to bypass this type of error.

After that if I try again, I get the redirect error. The redirection URL in my Spotify app is correct and does not redirect to https.

I finally fixed it. After clearing all cookis and cache I’ve noticed one of my privacy plugins was preventing Spotify API to work properly :slight_smile:

Thanks for the fix, all is working good now…
When the support also to Sonos?

Hello All,

I have a problem I am struggling with, I hope somebody can help.

I have the card setup and it shows my playlist fine. I want to cast to my chromecast devices so I also set up spotcast. The spotcast sensor.chromecast_devices shows all my devices fine.
I can’t choose a mediaplayer on the card though. If I hover over the choose mediaplayer button it says spotify connect devices and thats all.

What am I missing ?

Thanks in advance

@fondberg Just updated to latest version and same with Spotcast

When I enable daily mixes I’m getting this error from the logs:

Received invalid command: spotcast/playlists

I did configure the new cookies. Any leads?

It seems to me the ‘device’ option of the card is not working as if i add this the dropdown menu of the devices is always showed.
My doubt is ‘device’ name should be the entity_id or the friendly_name of the media player?
In my case ‘Salotto Audio’ or ‘media_player.salotto_audio’?

Amazing card. Is there also a possibility to only show certain chromecast devices, and no spotify connect devices at all? (Maybe playing with the spotcast sensor should help? Please help me out here) Thanks again @fondberg

Nope, of course i don’t have a duckdns, its not available anymore. But i could use instead: Nabucasa
url.https://xxxxxxxxxxxxxxxx.ui.nabu.casa/lovelace/0 1 2 3 not working
url.https://xxxxxxxxxxxxxxxx.ui.nabu.casa:8123/lovelace/0 1 … 4 not working
url.https://xxxxxxxxxxxxxxxx.ui.nabu.casa:8123/lovelace/media
url.https://xxxxxxxxxxxxxxxx.ui.nabu.casa:8123/lovelace/media/callback not working
… .:8123/auth/external/callback` not working

And just locaL
http://192.168.1.199:8123/lovelace/media not working
http://192.168.1.199:8123/auth/external/callback/ not working

It is only possible to show either all devices or pre select a device.

1 Like

I am failing to authorize and I have tried all of these same address with my information as well. Nothing is working to get the correct redirect uri

Hello @fondberg,

great work, a great thank you, but it doesnt work anymore after 0.111 ha update :

i upgrade hacs and the last updade for spotify-card, then i was prompt to link my spotify account again…i succeed…then i select my Google Home to cast and i can hear the sound “on” of the GH but then i have an error and no music is playing :

here is the log:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 472, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/spotify/media_player.py", line 85, in wrapper
    result = func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/spotify/media_player.py", line 354, in update
    self._playlist = self._spotify.playlist(current["context"]["uri"])
AttributeError: 'Spotify' object has no attribute 'playlist'

the error is :

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/me/player/play&device_id=5fdce05694b60555df36e20eee8d109a

and there is an advice to contact the author of the custom component :

Detected use of deprecated `base_url` property, use `homeassistant.helpers.network.get_url` method instead. Please report issue to the custom component author for spotify-playlist-sensor using this method at custom_components/spotify-playlist-sensor/sensor.py, line 88: callback_url ='{}{}'.format(hass.config.api.base_url, AUTH_CALLBACK_PATH)

its just me or someone else have some trouble with?

Dont know what to do…

Any help will be appreciated :wink:

thanks!

The lasr error is not from spotcast. The other earlier suggests that you have some dependency problem.
Try uninstalling, rebooting and reinstalling

Is it possible to use this card twice on the same page? I would like to have both dailyMixes: true and dailyMixes: false available on the same page, but one of the two gets really messed up

Same happens here… Hope developer will fix this…

it is not possible to have the card twice for some reason. I have very limited time for this project atm so I hope someone can step up and check.

Meanwhile you need to use 1 card per URL

Thanks @fondberg !

i try without success last night, and this evening it works again lol!

Perhaps there is some network problem…the error 404 is “ressource anavailable”…so…

Anyway i love your card! great work! hope you will maintain :wink:

hi @fondberg,

each time there is an update of HA ( yesterday its 0.111.2) i execute the AddOn “Check HA configuration” and still the 0.109 i have this issue :

home assistant Platform error sensor.spotify-playlist-sensor - No module named ‘dateutil’

any idea please?

EDIT : the card work great whithout “MARIA DB ADDON”, but when MariaDb AddOn is install i have the error 404…dont understand anything