Error with input select

I have some problems with my input selects.

I got this error when I start up Homeassistant:

2018-01-09 21:28:28 WARNING (MainThread) [homeassistant.components.input_select] Invalid option: Darkorange (possible options: critical, fatal, error, warning, warn, info, debug, notset)

This is how my configuration looks like:

  hass_template:
    name: Velg Theme
    options:
      - default
      - Teal
      - Darkred
      - Darkcyan
      - Darkorange
    initial: default
    icon: mdi:theme-light-dark
    
  error_template:
    name: Logger
    options:
      - critical
      - fatal
      - error
      - warning
      - warn
      - info
      - debug
      - notset
    initial: warn
    icon: mdi:message-alert

Automation:

  - alias: Error Velger
    trigger:
      platform: state
      entity_id: input_select.error_template
    action:
      service: logger.set_level
      data_template:
        homeassistant.components: "{{ trigger.to_state.state }}"

and:

  - alias: Theme Select
    trigger:
      platform: state
      entity_id: input_select.hass_template
    action:
    - service: frontend.set_theme
      data_template:
        name: "{{ states.input_select.hass_template.state }}"
        
  # IF: { sun.sun goes under horizon } THEN: { set theme to night mode }
  - id: day_to_night_theme
    alias: day_to_night_theme
    trigger:
      - platform: template
        value_template: "{% if is_state('sun.sun', 'below_horizon') %}true{% endif %}"
    action:
      - service: input_select.select_option
        data:
          entity_id: input_select.hass_template
          option: 'Darkcyan'

  # IF: { sun.sun is up } THEN: { set theme to day mode }
  - id: night_to_day_theme
    alias: night_to_day_theme
    trigger:
      - platform: template
        value_template: "{% if is_state('sun.sun', 'above_horizon') %}true{% endif %}"
    action:
      - service: input_select.select_option
        data:
          entity_id: input_select.hass_template
          option: 'default'

It seems like “error template” uses one of the options for “hass_template”.
Has anyone had the same problem?

I’ve got the same problem. Did you figure out what the source of the issue was?

No, have not figured out what’s wrong, but with beta v0.72 I haven’t got it yet. And think I haven’t got it with version 0.71 either. Do you?

I’ve just updated to the most recent 0.74 and have still got the same issue (across all updates leading to this one too).

change all your automations to use the trigger instead of the device itself:

example:

Change this

  - alias: Theme Select
    trigger:
      platform: state
      entity_id: input_select.hass_template
    action:
    - service: frontend.set_theme
      data_template:
        name: "{{ states.input_select.hass_template.state }}"

To this:

  - alias: Theme Select
    trigger:
      platform: state
      entity_id: input_select.hass_template
    action:
    - service: frontend.set_theme
      data_template:
        name: "{{ trigger.to_state.state }}"

and if that doesn’t work, check the state before setting it:

  - alias: Theme Select
    trigger:
      platform: state
      entity_id: input_select.hass_template
    action:
    - service: frontend.set_theme
      data_template:
        name: >
          {% if trigger.to_state.state in state_attr(trigger.entity_id,'options') %}
            {{ trigger.to_state.state }}
          {% else %}
            Some Default Value
          {% endif %}

Thanks, but the problem seems to only be with the “error velger” automation.

Changing it to this instead, seems to work:

  - alias: Error Velger
    trigger:
      platform: state
      entity_id: input_select.error_template
    action:
      service: logger.set_level
      data_template:
        homeassistant.components: "{{ states.input_select.error_template.state }}"