Open hmmbob opened 3 days ago
I have the same problem thanks
Home assistant must have changed the structure of the media player entity.
We could print to debug the Dir of the object
Seems that they moved SpotifyMediaPlayer.data.devices
to SpotifyMediaPlayer.devices
. Testing if it resolves the issue
ok can confirm the issue is with the new coordinator. We used to have access to a device
callable that would provide the devices linked to an account, but devices is now a DataUpdateCoordinator
. I don't have enough detail yet to understand how to interact with these Coordinator, I'll try to do some digging, but if others can help I wouldn't mind
ok found the solution, had to add the hass
object to the get_spotify_device_id function to force the refresh of the data. Its now working.
This might be a really good improvement, because that would also mean we can force refresh the list of devices now.
Tested in version 2024.10.0b4
and 2024.9.3
. Both working without issues. I'm going to release the preventive fix for the beta
Closing with release of v3.8.2
Please reopen of bug still appears from your side
For me, Version 3.8.2 does not work on HA 2024.9.3. I updated today, directly after the restart the playlists and players stay empty in spotcard. Protocol monitors some errors:
Logger: homeassistant Quelle: custom_components/spotcast/init.py:146 Integration: Spotcast (Dokumentation, Probleme) Erstmals aufgetreten: 15:23:32 (1 Vorkommnisse) Zuletzt protokolliert: 15:23:32
Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/config/custom_components/spotcast/helpers.py", line 122, in run return await loop.run_in_executor(executor, pfunc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/spotcast/init.py", line 146, in get_devices resp = get_spotify_devices(spotify_media_player) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: get_spotify_devices() missing 1 required positional argument: 'hass'
Going back to 3.8.1 and everything works as expected.
Works for 2024.10 indeed, thanks.
@fcusson To fix
For me, Version 3.8.2 does not work on HA 2024.9.3. I updated today, directly after the restart the playlists and players stay empty in spotcard. Protocol monitors some errors:
Going back to 3.8.1 and everything works as expected.
You could raise the HA version in hacs.json to 2024.10.0b0:
https://github.com/fondberg/spotcast/blob/cb2f905a6c62022b4a97a0f611026c409e661e3f/hacs.json#L4
User that are on an older version will not get this update pushed by HACS then. I don't think you need a new release for that, just change the json.
@hmmbob hmmm... I added new validation, we should still hit the old structure first, this is weird. I'll take a look, can you give me a link to the spotcard you are using?
Oh, it's working for me!
You need @Flibbmaster support
@hmmbob
Oh, it's working for me!
Sorry misread that part
@Flibbmaster if you could provide some details, I might have the spotcard you are mentionning in my regression tests
Hi, @fcusson ,
Using this Lovelace Card from HACS: https://community.home-assistant.io/t/spotify-lovelace-card/103525
ok thanks, I'll check, but I know it is now breaking a lot. I don't have access to this project from Fondberg, I'll see what I can do, but it might become an abandonware saddly.
@fcusson Totally understood, that card is not from you, so no responsibility on your side. For me it was just the easiest way to implement the playlists and players in a single card in the Dashboard.
Same.... Spotify Card not work after update to ver. 3.8.2 ...((( https://github.com/custom-cards/spotify-card
Bug Ticket
Describe the bug
Spotcast breaks when you upgrade from HA 2024.9 to 2024.10
Likely a regression because of https://github.com/home-assistant/core/pull/123548
Troubleshooting
Make sure to validate all the elements before submitting the ticket (Exception to the steps marked as optional)
sp_dc
andsp_key
values and restarted Home Assistant (see README)Environment
Logs