Can the input_select integration use a template to create options?

Can I create an input select integration that creates the input options from the hvac_mode: attribute of a climate device, which is off, on, or ,auto such that if the climate device were to change somehow, the associated input_select would still contain the correct information as options?

-or- do I need to manually add the options to the input_select as suggested in the config details?

1 Like

you can dynamically set the options via service.

1 Like

I can dynamically set the option, but can I dynamically establish the options based on a list of attributes from an entity?

Here’s a python_script to fill input_select from a group.

Hi,

you can change the options with a service call. Here an automation that set the list of an sensor attribute to a input_select box.

alias: Option List Test
description: ''
trigger: []
condition: []
action:
  - service: input_select.set_options
    data:
      options: |
        {{ state_attr("light.yeelight_color1_7c49eb13b7de", "effect_list") }}
    entity_id: input_select.who_cooks
mode: single

1 Like

When I think of “setting options” I think of “selecting the option” and making it happen. So, what you’re suggesting is that the service: input_select.set_options actually creates the options that can then be used for selection…

yes?

yes…(10 char min)…

1 Like

A job for the new template select entity!

1 Like

I too would like to see template ability for dynamic options added to the input_select integration!

2 Likes

so in the example above I should be able to see an entity Option List Test and the dynamic drop down shows when I select that in a select type card?