Created
November 4, 2021 17:58
-
-
Save chatainsim/f090a1c45ff1c90fec76f59b00e05931 to your computer and use it in GitHub Desktop.
Windows_climat.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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 | |
trigger: | |
- platform: state | |
entity_id: !input 'window_entity' | |
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_for_trigger: | |
- platform: state | |
entity_id: !input 'window_entity' | |
to: 'off' | |
continue_on_timeout: false | |
- service: climate.turn_on | |
entity_id: !input 'climate_target' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment