Input_select: 1 option list various input_select

Hello everyone,

I wonder if it is possible to use 1 option list for different input_selects.

So what I mean is:
e.g. 1 option list:

  • Q music
  • Q music Max Hits
  • Q-music Error
  • Joe 80-90
  • VRT Limburg
  • VRT Radio 1
    and I want to use this for different input_select being:
    input_select.zender_kitchen
    input_select.zender_living
    input_select.transmitter_bedroom
    input_select.transmitter_bathroom
    input_select.zender_dressing

If it is possible, how do I do this?

Thanks for every response.

My first thought was: just use a template to populate the input_select’s options. But, unfortunately, it looks like options is not templatable….

So… another idea: you could make an automation that populates the “duplicate” input_selects options via input_select.set_options service.

In your automation, hook onto the HOMEASSISTANT_STARTED event as a trigger.

Thank you very much for your response.
I’m going to try your 2nd option.

I tried this.
But this doesn’t work either because then the input_select settings will be lost.

when? wdym?

you can set a var with the current value, before calling set_options, and then select the value back.

Thank you for your response.

I’m very new here. Can you tell me how to do something like that?

I just went over this. But I still don’t quite understand it. Could I ask you to give an example of this?

How do I give a value to a variable and retrieve it afterwards?

your description of what you want is pretty unclear. do you mean:

  1. do you have many input_select that have the same options and you’re looking to have 1 main input_select control them such that when you select something on your input_select.main, it selects the same thing on all the others? (ie, the selected option is synchronized)

  2. or are you saying that the actual options (the possible choices) on your main input_select changes, and when you change what possible choice you could have on the main one, the possible choices should update on the others? (ie, the set of possible choices is synchronized)

or something else?

if you’re asking about 1, you could do something like this

trigger:
  - platform: state
    entity_id:
      - input_select.test_dropdown
condition: []
action:
  - service: input_select.select_option
    data:
      option: "{{ state('input_select.test_dropdown') }}"
    target:
      label_id: your_label_group
  1. replace test_dropdown with the name of your main input_select.
  2. create a label, put all the child input_selects that you want controlled by your main one in that label. and change your_label_group in my example to whatever name you choose.
1 Like

Did you try to google like home assistant variables? Plenty examples/topics on the subject.

Why would you want to do this? Please explain what you actually want to achieve.

If I understand your question correct, than one input_select would be enough. Why would you want to duplicate this?

1 Like

Thank you for your response.

I have a list of radio stations and I want to be able to choose which station should play for each Sonos player!

And how do you want to use this? :slight_smile: In an automation or just as media control? The more you share, the better the help can be… :wink: :slight_smile:

Anyway, wouldn’t it make more sense, to have one input_select with the stations, and some other control on what media_player it should play?

Let us know more details, and we can help better. :slight_smile:

1 Like