Im Trying to turn the Climate back off when both Input Sensors are closed again (State = Off) already checked the State in the Debug. the problem seems to be the Wait Template, it doesnt seenm to reference to the Frontend Input Sensors correctly
blueprint:
name: Window open, climate off after a defined time
description: An automation that turns off a running your climate device for exmple
a heater or an air conditioning if a window sensor is open for a specific time.
It waits until the window is closed again in order to turn the climate entity
on again.
domain: automation
input:
window_entity:
name: Window Sensor
description: The Window-Door sensor that controls the climate entity.
selector:
entity:
domain: binary_sensor
device_class: door
window_entity_2:
name: Window Sensor
description: Another Window-Door sensor that controls the climate entity.
selector:
entity:
domain: binary_sensor
device_class: door
minimum_open_time:
name: Miniumum time the window is open
description: Time in seconds to wait until the automation is triggered
default: 12
selector:
number:
min: 0.0
max: 120.0
unit_of_measurement: seconds
mode: slider
step: 1.0
climate_target:
name: Climate Device
description: The climate entity that is controlled by the window sensor.
selector:
entity:
domain: climate
source_url: https://community.home-assistant.io/t/window-open-climate-off/257293
trigger:
- platform: state
entity_id: !input 'window_entity'
to: 'on'
for: !input 'minimum_open_time'
- platform: state
entity_id: !input 'window_entity_2'
to: 'on'
for: !input 'minimum_open_time'
condition:
- condition: not
conditions:
- condition: state
entity_id: !input 'climate_target'
state: 'off'
action:
- service: climate.turn_off
entity_id: !input 'climate_target'
- wait_template: "{{ is_state('!input window_entity', 'off') }}"
continue_on_timeout: false
- wait_template: "{{ is_state('!input window_entity_2', 'off') }}"
continue_on_timeout: false
- service: climate.turn_on
entity_id: !input 'climate_target'
Tried different Iterations of the Wait Template, however i cant really find anything about using Input Sensors with Wait Templates,
Any Help is greatly appreciated!