Last active
December 14, 2020 14:42
-
-
Save clempat/6b68f9dc5742a604a0353de9a535cb10 to your computer and use it in GitHub Desktop.
Windows Heating Blueprint Home Assistant
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: Windows Heating | |
description: Will turn off the heating when any window is open and turn it back on when windows are closed | |
domain: automation | |
input: | |
windows: | |
name: Windows | |
description: Binary sensor representing all windows of a room | |
selector: | |
entity: | |
domain: binary_sensor | |
device_class: window | |
is_heating_on: | |
default: false | |
name: Heating ON/OFF | |
description: Heating Main Switch (optional) | |
selector: | |
entity: | |
climate: | |
name: Thermostat | |
description: Thermostats to switch off or on | |
selector: | |
entity: | |
domain: climate | |
trigger: | |
platform: state | |
entity_id: !input windows | |
action: | |
- choose: | |
- conditions: | |
- condition: state | |
entity_id: !input is_heating_on | |
state: 'on' | |
- condition: template | |
value_template: "{{ trigger.to_state.state == 'on' }}" | |
sequence: | |
- service: climate.turn_off | |
entity_id: !input climate | |
- conditions: | |
- condition: state | |
entity_id: !input is_heating_on | |
state: 'on' | |
- condition: template | |
value_template: "{{ trigger.to_state.state == 'off' }}" | |
sequence: | |
- service: climate.turn_on | |
entity_id: !input climate | |
default: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment