Use input_select as selector.select.options in a script

Hey guys,

I’m currently using a fixed list in a script for the select-options in a selector.

Can I somehow use the option defined in an input_select instead?

That’s the yaml of the script:

fields:
  room:
    name: Room
    required: true
    example: living_room
    selector:
      select:
        options:
          - bathroom
          - bedroom
          - hallway
          - kitchen
          - living_room
          - patricia_s_room
          - stairway_landing

Do you want to use the currently selected option, or full list of available options?

I know I’m doing something incorrectly, but I just cannot get the selector.select.options working. My full, but incomplete, script is below.

I get the error Array has too many items. Expected 1 or fewer. to the right of the next section, but the error highlighting starts at - Google

The error message goes away if I remove the second selection, namely - Sonos
The location of the selector does not matter. Meaning I can put it anywhere in the fields and I get the error.

door_chime:
  variables:
    default_volume: input_number.announcement_volume
  fields:
    player:
      name: Media Player
      description: Play on Sonos or Google
      required: false
      default: 'Google'
      selector:
        select:
          options:
            - Google
            - Sonos
    sound:
      name: Sound File
      description: The sound to play
      example: matrixxx__ping.wav
      required: false
      default: 'matrixxx__ping.wav'
      selector: 
        text:
    volume:
      name: Volume
      description: The volume at which to play the sound
      example: '0.5'
      required: false
      default: '{{ default_volume }}'
      selector:
        number:
          min: 0
          max: 1
          step: 0.1
          mode: slider
  sequence:
  - condition: state
    entity_id: input_boolean.audible_notifications
    state: 'on'
  - service: media_player.volume_set
    target:
      entity_id: media_player.home_group
    data:
      volume_level: template
      value_template: '{{ volume }}'
  - service: media_player.play_media
    target:
      entity_id: media_player.home_group
    data:
      media_content_id: /local/sounds/matrixxx__ping.wav
      media_content_type: music/wav
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: media_player.volume_set
    target:
      entity_id: media_player.home_group
    data:
      volume_level: 0.25
  mode: single
  alias: Door Chime
  icon: mdi:bell-ring