#Make input helper variable?

1 messages · Page 1 of 1 (latest)

primal pike
#

I have the following automation that enables a scene based on the currently selected value of a dropdown helper.

    action: scene.turn_on
    target:
      entity_id: "{{ states('input_select.active_scene') }}"
    data: {}

I want to expand this further by making the input dropdown to use variable as well by adding it as a field in a script. But I can't seem to figure out how to point to a dynamic input helper.

How would I do this?

ripe sableBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

karmic nimbus
#

You could make a field in the script where you can select a input_select.

entity:
  filter:
    domain: input_select
primal pike
#

Thanks @karmic nimbus

#

This is what I ended up with:

fields:
  scene_dropdown:
    name: Scene dropdown
    required: true
    selector:
      entity:
        filter:
          domain: input_select

sequence:
  - action: scene.turn_on
    metadata: {}
    target:
      entity_id: "{{ states(scene_dropdown) }}"
    data: {}