I have a blueprint with a variable and I would like to wait until all of them are in the OFF state in the action.
variables:
motion_trigger: !input motion_trigger
In Action: If I put a sensor in it works but there are many and they can change so I need to use the variable.
- alias: "Wait until all binary sensors are off"
wait_template: "{{ is_state('binary_sensor.motion_sensor_front_door', 'off') }}"
If I try any of these they don’t work.
- alias: "Wait until all binary sensors are off"
wait_template: "{{ state('motion_trigger', 'off') }}"
#or
- alias: "Wait until all binary sensors are off"
wait_template: "{{ states('motion_trigger', 'off') }}"
#or
- alias: "Wait until all binary sensors are off"
wait_template: "{{ state[motion_trigger] == 'off' }}"
#or
- alias: "Wait until all binary sensors are off"
wait_template: "{{ states[motion_trigger] == 'off' }}"
#or this one, I thought it would work
- alias: "Wait until all binary sensors are off"
wait_template: "{{ states[motion_trigger].state == 'off' }}"
could anyone help?