KoljaWindeler / ytube_music_player

YouTube music player for homeassistant
345 stars 53 forks source link

New Playlist Entity value not saved permanently #338

Open wtaferner opened 6 months ago

wtaferner commented 6 months ago

Describe the bug/feature It seems that the new SELECT entity value for the playlist will not survive a restart of HA. For some reason the other value of the SELECT entities seem to preserve the last value or a default value is stored elsewhere.

Version 20240420.02

To Reproduce Set a value for your playlist entity and restart

wtaferner commented 6 months ago

@mang1985 Any idea why the value is not preserved?

mang1985 commented 6 months ago

After each Home Assistant restart, the ytmusicapi logs in again and reloads playlists, which are then populated into the dropdown. This causes the selected option of the entity to be cleared. I will work on a solution to have the component reselect the user's previous choice after completing playlist loading.

wtaferner commented 6 months ago

Ahh, this makes sense, and before it was hardcoded in the yaml with a default. Thank you for the hint and linking the dots 👍🏼