Input Select with Alexa for Scene Control

I’ve setup an input_select in configuration.yaml to allow for me to expose a dropdown list in lovelace to control 5 scenes in my main room. I’ve wired this input_select to an automation that fires when the value changes and executes the appropriate script to set all the lighting and other devices to the appropriate settings. I’m now wrestling with how to expose this to Alexa via Home Assistant Cloud. I’ve successfully exposed the input_select entity to Alexa but can’t seem to get it to respond and set the value.

Configuration.yaml entries;

  down_scene:
    name: Downstairs Scene Select
    options:
      - Dinner
      - Party
      - Night
      - Bright
      - TV
      - None
    initial: None
    icon: mdi:lightbulb

Automation.yaml

  alias: Downstairs Scene Handler
  trigger:
  - platform: state
    entity_id:
    - input_select.down_scene
  action:
  - service: scene.turn_on
    data_template:
      entity_id: "{% if trigger.entity_id == 'input_select.down_scene' %}\n  {% if\
        \ trigger.to_state.state == 'Dinner' %}\n    scene.downstairs_dinner\n  {%\
        \ elif trigger.to_state.state == 'Bright' %}\n    scene.downstairs_bright\n\
        \  {% elif trigger.to_state.state == 'TV' %}\n    scene.downstairs_tv\n  {%\
        \ elif trigger.to_state.state == 'Party' %}\n    scene.downstairs_party\n\
        \  {% elif trigger.to_state.state == 'Night' %}\n    scene.downstairs_night\n\
        \  {% else %}\n    scene.downstairs_off\n  {% endif %}\n{% endif %}\n"
  initial_state: true
  mode: single

How can I setup Alexa to respond to “Set Downstairs Scent to _____” (night, dinner, etc)

Hello and welcome to the forum.

Please read point 11 here then edit your post to format your pasted configuration correctly.

Thanks…tried to update based on your link.

The automation’s template can be reduced to this:

  alias: Downstairs Scene Handler
  trigger:
  - platform: state
    entity_id: input_select.down_scene
  action:
  - service: scene.turn_on
    target:
      entity_id: "scene.downstairs_{{ trigger.to_state.state | lower }}"
  initial_state: true
  mode: single

Helpful…thanks. Now I just need to figure out the bigger problem of getting Alexa to respond to “Set Downstairs Scene to _________”

According to Nabucasa’s Amazon Alexa documentation, input_select is not listed as one of the supported domains for use with Alexa.

Available Domains
Currently, the following domains are available to be used with Alexa:

  • alarm_control_panel (alarm control panels must not require an arm code)
  • alert
  • automation (enables/disables)
  • binary_sensor
  • camera
  • climate
  • cover
  • fan (supports on/off and set speed)
  • group
  • input_boolean
  • light
  • lock (lock and unlock, but unlock is untested as Amazon has disabled unlock for now)
  • media_player (play, pause, stop, set volume, adjust volume, next track, and previous track)
  • scene
  • script (enables/disables)
  • sensor
  • switch

Well, this explains it. I ended up creating Alexa routines to call the scenes and updated the scenes to set the input_select value to the appropriate value. This keeps everything in sync.

Glad to hear it.

Please consider marking my post (above) with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved? This helps users find answers to similar questions and will spare them the struggle and frustration of attempting to make an input_select visible to Alexa (via NabaCasa).


FWIW, another technique (that I have seen used in other posts) is to create a Template Switch for each option in the input_select. Switches are accessible to Alexa (no routines required but more entities are needed).

1 Like

I was trying the same. What I did and its maybe a dirty way. I created couple of input_booleans. Add them to Alexa. In Alexa I created some automations that will turn on an input_boolean. Inside HA the automation will trigger and do the job. In same automation it will turn of that specific input_boolean for the next time.