Skip to content

Instantly share code, notes, and snippets.

@clempat
Last active December 14, 2020 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clempat/6b68f9dc5742a604a0353de9a535cb10 to your computer and use it in GitHub Desktop.
Save clempat/6b68f9dc5742a604a0353de9a535cb10 to your computer and use it in GitHub Desktop.
Windows Heating Blueprint Home Assistant
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