Skip to content

Refresh MA playlist with script #2403

Answered by mooseBringer
mooseBringer asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks!
The .name did it and I had the wrong syntax for calling helpers. Now I set up a input_select to randomly fetch my manually added favorites from and store in a helper (then I can also edit it from UI) and then do a mass search for random album. Works great. Also I did one more script for artist radio.

Random artist from input select and mass album search:

alias: MA_GetRandomAlbum
sequence:
  - service: input_text.set_value
    data_template:
      entity_id: input_text.ma_kok_artist
      value: "{{ state_attr('input_select.ma_kok_artister', 'options') | random }}"
  - service: mass.search
    data:
      limit: 20
      name: "{{ states.input_text.ma_kok_artist.state}}"
      medi…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@OzGav
Comment options

OzGav Jun 3, 2024
Maintainer

@mooseBringer
Comment options

@OzGav
Comment options

OzGav Jun 4, 2024
Maintainer

@mooseBringer
Comment options

Answer selected by OzGav
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@de666
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants