I have the following input select:
lounge_ac_mode:
name: Upstairs AC Mode
options:
- 'Off'
- Powerful Heat
- Normal Heat
- Silent Heat
- Powerful Cool
- Normal Cool
- Silent Cool
- Dry
icon: mdi:format-list-bulleted
When I try to run this action:
action:
- service: input_select.select_option
data_template:
entity_id: input_select.lounge_ac_mode
option: >
{% if states.sensor.roomt.state < states.input_number.lounge_ac_heat_temp_set.state %}
Normal Heat
{% elif states.sensor.roomt.state > states.input_number.lounge_ac_cool_temp_set.state %}
Normal Cool
{% else %}
"Off"
{% endif %}
And “Off” is the result I get the following error in the log:
Invalid option: "Off" (possible options: Off, Powerful Heat, Normal Heat, Silent Heat, Powerful Cool, Normal Cool, Silent Cool, Dry)
I have tried single quotes around ‘Off’ but the error still occurs. If I do not use quotes the word Off evaluates as ‘False’ and I get an error again.
At the moment I am using the workaround of using the input select option _Off_
but that does not look great. Is there any other way around this? Is it a bug?
EDIT: Actually on further testing it’s not the quoted option that is the problem. If the option is already selected (i.e. the input_select state is already Off
) then the error occurs. And actually it is a warning not an error. It is still a valid option though which is why the warning text is misleading.