In short, if I understand this compnent correctly, it isn’t connected directly to Spotify, but rather tells a spotifyclient on a computer or phone what to do.
That spotify client provides a list of available devices to cast to and that list is the problem. Spotify only give home assistant access to the devices that are currently available, if thchromecast is turned of or connected to something else, it’s no longer available for home assistant.
I don’t think that the component is interacting with spotify connect correctly. It simply deletes available sources at random when switching it seems.
I would recommend to try and play around with something like mobidy as an alternative. It seems a bit more complicated, but as far as I have understood it acts more like a dedicated player - nullefying the whole spotify connect debuggel. I will give it a try in the near future myself
It is working with my Phone and desktop when i leave the Spotify app/program on for a period of time.
Unfortunatly this isnt the case for my chromecasts. Hope there will be a way to solve this!
My thoughts are if we can install Spotify on a Pi we won’t be dependent on a computer or phone.
My knowledge of Raspbian and or linux are limited so I’m asking if you think this is feasible?
Not to beat a dead horse - more than I have already done - but it is simply not true that the spotify component sees what spotify sees in terms of devices. It sees some of the devices and for a limited period of time. This makes the component useless in effect, and nobody seems interested in hearing about it.
I would recommend to try and play around with something like mobidy as an alternative. It seems a bit more complicated, but as far as I have understood it acts more like a dedicated player - nullefying the whole spotify connect debuggel. I will give it a try in the near future myself
I don’t want to dredge up an old thread but I doubt it’s possible to fix this without having some sort of hook into the Chromecast (a local phone/tablet) reason being is that they are competing standards! (Connect and cast) cast is built as a “2nd screen” whereas connect is more of a streaming client…
…that being said, I have just set up the Spotify component and will investigate (2 casts vs. 1 dot, I need the casts to work!)
but the only thing I can hear on my Google Home Mini is a short “bling” sound and then nothing happens. If I change the media_content_id to a mp4 stream and media_content_type to audio/mp4 it works as it should.
What is the problem with a Spotify playlist here?
It works also with Spotify as long as you are or have played something to a speaker recently.
After some time it seems that the possible sources are not visible anymore.
I don’t know how to find out about the alias numbers.
@chimpy Don’t buy a chromecast if you want to use it with HA and the Spotify Component.
I must stress that this is not having to do with Chromecast being bad on the Spotify App, they are great. This is however an issue with the HA Spotify component forgetting (especialy) chromecasts rather quick (even when they are clearly visible in the Spotify App.
@Peleke It some time since I did this, and due to the above mentions issues I dont use it myself, but take a look at this, it should work (if your chromecast is remembered by the component) Spotify Playlist Player