Thank you so much for this component, it’s fixed one of my pet peeves.
I use a Chromecast attached to my AVR to play Spotify and control it with my Harmony Elite. I’m already using Emulated Roku to control playback but have always had to start something playing on the device and then manually select the device in the Spotify app after. Other members of the family also use the AVR so same issue for them.
Now I’ve set up your component with each account and, using automations through Emulated Roku again, after hitting the Play Music activity on the remote they get a screen to select which account they want to use eg Dad’s Account, Sam’s Account etc. Couldn’t be simpler and app is ready to go straight away, especially using it on my Mac where you can’t select the Chromecast as a device and have to start the web app in Chrome to be able to cast.
400 Client Error: Bad Request for url: https://accounts.spotify.com/api/login
That is the mesasge I’m getting. When I try to call the service only providing a entity_id and a spotify uri.
I have configured my user and password as described in the docs:
After upgrading Home Assistant to 0.104.0, I am encountering something weird:
When I try to start a playlist from a script, it doesn’t work.
Starting music from the Spotify-card on an idle speaker group is working flawlessly, however.
My script is:
play_music:
alias: Play Spotify on home group
sequence:
- service: spotcast.start
data:
device_name: "Home group"
uri: "spotify:playlist:3rIRPguVt95QoLoxroLx9x"
The error I’m getting:
[record[a,in-unique,aa776170-1968-6d4f-d738-48efdcc25617.local.]=120/119,172.20.1.131:42613] Failed to connect, retrying in 5.0s
I have checked and the IP mentioned above corresponds to one of the Google Mini speakers. This particular speaker is connected, part of the speaker group, and also plays music when I start it from the Spotify-card. I power cycled the speakers, but it doesn’t help. I also removed and re-added the Google Cast integration and all cast entities.
Shit, they merged the change to upgrade zeroconf in hass. This makes chromecast (all chromecasts not only spotify) failing to start.
This needs to be reported back to HASS main project on the chromecast sub project.
Workaround is to downgrade zeroconf to the previous version
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 419, in _async_add_entity
await entity.async_update_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 284, in async_update_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 314, in _async_write_ha_state
attr = self.capability_attributes
File “/usr/src/homeassistant/homeassistant/components/media_player/init.py”, line 791, in capability_attributes
if supported_features & SUPPORT_SELECT_SOURCE:
TypeError: unsupported operand type(s) for &: ‘NoneType’ and ‘int’
Meh, it doesn’t work because spotify free account, with premium and spotify-card it plays. But that error still persist in HA logs and media_player.spotify entity doesn’t exist.
I’m seeing a lot of bugs with entities with the latest update on different topics. I think I’ll hold out on updating from 102.3 (103 had a bug with Zwave Radiators and I had to roll back then).
Actually that is only a rewrite. The purpose of spotcast is to start playback on a chromecast which requires the more powerful browser login token. It has always been my goal to make spotcast redundant but that would require that the spotify integration in home assistant would make it possible to use the browser token which I doubt would happen as it is scraped and unofficial
Just released v.2.6.0 which pins the zero conf version to 0.24.3 which should make it work again. 0.24.4 didn’t contain that much so I think it is safe to use 0.24.3.
It is kind of a rewrite so please help test it.