I struggle with the input_boolean when used in template variable.
blueprint:
...
input:
overwrite_boolean:
name: Overwrite Boolean (Optional)
description: ...
selector:
entity:
filter:
domain: input_boolean
default: []
variables:
overwrite_boolean: !input overwrite_boolean
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: door_opened
- condition: template
value_template: "{{ states(overwrite_boolean) in ('unavailable', 'unknown', 'off') }}"
sequence:
- service: input_number.set_value
data:
value: 2
target:
entity_id: !input room_state
When I replace the variable with the specific entity, the automation works as expected:
"{{ states('input_boolean.entrance_overwrite') in ('unavailable', 'unknown', 'off') }}"
However, when used with the variable, either:
- â{{ states(overwrite_boolean) in (âunavailableâ, âunknownâ, âoffâ) }}â
Automation works except case when the entity is not defined in the blueprint. - â{{ states(âoverwrite_booleanâ) in (âunavailableâ, âunknownâ, âoffâ) }}â
Automation works only when variable not defined.
I tried creating the condition several different ways aslo with the use of has_value(), but canât make it work. Perhaps someone knows what Iâam doing wrong.