Everything worked fine for a long time until I updated HA. After that I could still use Spotify Connect without a problem, however, the device was not shown anymore in the Spotify Integration. I first assumed it was an issue with the integration (see https://github.com/home-assistant/core/issues/97867), however, after writing the following script I found out that it was the Spotify API.
import spotipy
import yaml
from spotipy import SpotifyOAuth
with open("config.yml", "r") as stream:
config = yaml.safe_load(stream)
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope="user-read-playback-state", **config['auth_manager']))
print("Authenticated as {}".format(sp.current_user()['display_name']))
res = sp.devices()
for device in res.get("devices"):
print(device)
Expected behavior
The device should be listed in the Spotify sources.
Actual behavior
There are two devices listed, however my HA Spotify is not listed.
Setup HA with Spotify Connect with the same versions
Use my attached script
Logs
In my opinion the logs are looking fine:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: Spotify Connect
Play Spotify music on your Home Assistant device
-----------------------------------------------------------
Add-on version: 0.12.4
You are running the latest version of this add-on.
System: Home Assistant OS 10.4 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.8.1
Home Assistant Supervisor: 2023.08.1
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun spotifyd (no readiness notification)
s6-rc: info: service legacy-services successfully started
[20:18:36] INFO: Starting the Spotify daemon...
[2023-08-09T18:18:37Z INFO librespot] librespot 0.4.2 UNKNOWN (Built on 2023-05-17, Build ID: PtL7ynVq, Profile: release)
Problem/Motivation
Everything worked fine for a long time until I updated HA. After that I could still use Spotify Connect without a problem, however, the device was not shown anymore in the Spotify Integration. I first assumed it was an issue with the integration (see https://github.com/home-assistant/core/issues/97867), however, after writing the following script I found out that it was the Spotify API.
config.yml
test.py
Expected behavior
The device should be listed in the Spotify sources.
Actual behavior
There are two devices listed, however my HA Spotify is not listed.
Steps to reproduce
Logs
In my opinion the logs are looking fine:
It also works with the official Spotify app.