Nearly all of my automations depend on the state of my home (I use an input select with modes for Sleep, Away, Home, etc). Most automations should happen if I’m in one or two of the states, but not others. Conditionals for equal one specific value are easy, but conditionals for one of several possible values require a template condition. I end up with conditions like these on nearly all of my automations:
- condition: template
value_template: '{{ states(''input_select.home_mode'') not in [''Sleep'', ''Away'']}}'
OR
- condition: template
value_template: '{{ states(''input_select.home_mode'') in [''Home'', ''Night'']}}'
I’d like an easy UI/YAML supported way to say this same thing. Something like:
- condition: state
entity_id: input_select.home_mode
states:
- Vacation
- Away