I have an input_select
that stores a number of states. When something changes the value of the input_select
, I want to trigger an automation.
However, I don’t care what the value was (from
) or what the value is not (to
). I want to use a choose based on the value of the input_select.option
.
Choose was described last night to be like a JavaScript switch, but that doesn’t appear to be the case as each case or conditions
as Choose calls them are not based on a common expression.
I know the syntax isn’t correct. This is just trying to explain what I want to do:
automation:
- trigger:
<input_select>: value changes
action:
- choose: <input_select>.<select_option>
- condition: this
sequence:
- service:
- condition: that
sequence:
- service:
- condition: other
sequence:
- service:
default:
sequence:
- service:
Simply trying to find the most optimal way - without repeating the same thing over and over.
Any advice would be great.