I am using a dropdown list in HABpanel to select the current playlist for my MPD (music player daemon).
The dropdown list is generated based on the state of a String item (MpdPlayLists) which gets the available playlists from MPD via MQTT as a CSV list. This all works pretty well
However, when the available playists change (e.g. a new playlist is added to the list), it does not show up in the dropdown list. It is only displayed in the dropdown list after reloading the whole HABpanel page.
I would prefer the dropdown list to be updated when the MpdPlayLists item is updated.
Is there a way to trigger the reloading of a widget content based on an item update?
Do you have any other suggestion how the update of the dropdown list could be triggert?
I am currently experimenting with JS code to achieve this, but I have no succeeded. I have very limited experience with JS and lazy-load and I am not sure if it is possible at all.
Hi,
I am struggling with a similar problem, trying to make a dropdown menu for my Spotify playlists.
I tried to convert Yannicks version to fit my bindings but without any luck.
I get the dropdown menu with select playlist title, but when i click the the menu I only have a NULL listed.
The playlist binding works perfectly with the standard selection widget with the server-provided items as âchoice of sourceâ.
@MikaelL - did you resolve this - and could you share some code please?
I am 90% of the way into completing my all-in-one home remote - all that is outstanding is Spotify playlists (without hardcoding them) and one day something similar for plex item selection.
Iâm using the Spotify code elsewhere on the board and am hoping to pull both my playlists and my recently played lists from the api as 2 dropdown items