Dynamically building input_select - Logitech Media Servier

I’m using a version of the Chromecast Radio script setup with my Logitech Squeezeboxes. It’s working well and now I’m looking to incorporate some other aspects of my Logitech Media Server - mainly all the stored music by dynamically building an input_select of all the available artists in LMS.

Through the dev services, I’m able to push a link to the artist folder as a playlist and that works. I’ve manually built an artist list as an input_select to control my music:


  name: 'Select Artist:'
    - Bruno Mars
    - Ed Sheeran


  alias: Play artist on squeezebox
    - service: media_player.volume_set
        entity_id: media_player.kitchen_radio
        volume_level: '0.35'
    -  service: media_player.play_media
         entity_id: >
          {% if is_state("input_select.chromecast_radio", "Kitchen Radio") %} media_player.kitchen_radio
          {% elif is_state("input_select.chromecast_radio", "Living Room") %} media_player.living_room
          {% endif %}
         media_content_id: >
          {% if is_state("input_select.artist_picker", "Bruno Mars") %}  /media/usb/Music/Bruno Mars
          {% elif is_state("input_select.artist_picker", "Ed Sheeran") %}  /media/usb/Music/Ed Sheeran
          {% endif %}
         media_content_type: 'PLAYLIST'

I know that through JSONRPC I can pull a list of all available artists using this script:

curl -X GET -H "Content-Type: application/json" \
                  -d '{"id":1,"method":"slim.request","params":["-",["artists",0,10000,"tags:la"]]}' \

LMS only re-scans once a day so this call would only need to happen daily. What I want to do is build the artist input_select dynamically using the set_options service. This is where my knowledge is limited though, I don’t know how to adjust the output of the curl to make it fit the YAML requirements

options: ["Artist 1", "Artist 2", "Artist 3"]

@smazman I know you’ve got some Squeezebox skills so don’t know if you can help here?

This can’t be done in YAML unfortunately.