fondberg / spotcast

Home assistant custom component to start Spotify playback on an idle chromecast device as well as control spotify connect devices
Apache License 2.0
672 stars 96 forks source link

Construct Spotify deviceID required for device auth refresh endpoint #406

Closed davidruigrok closed 1 year ago

davidruigrok commented 1 year ago

Fixes issue https://github.com/fondberg/spotcast/issues/398, where deviceID is missing in the response from the Spotify API. The devideID is actually a md5 hash of the friendly_name of the Chromecast. This PR should fix the current existing errors on the deviceID missing from the data in the response.

KapJI commented 1 year ago

I tested it on my HA instance and confirm that it works.

fcusson commented 1 year ago

@davidruigrok you are a genius. Thanks for thanking on the time to make the PR. I was going to try and tackle it during the weekend, but with how crazy my weeks are, I would probably not have been able to make it work fully.

fcusson commented 1 year ago

@davidruigrok there was a change required, since the last version of spotcast, Home Assistant has started requiring a name for every service. I made the change on master, you just need to fast-forward your branch for the check to get validated