Forked from quallenbezwinger/window_controlled_heater.yaml
Last active
December 17, 2022 14:53
-
-
Save Lucas-Steinmann/c2c93df7e91b2bfd8920d56f7c38dc40 to your computer and use it in GitHub Desktop.
Homeassistant blueprint to switch heater on or off depending on window or door sensor
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 controlled HVAC mode | |
description: Turn off/on thermostat when opening/closing window or door sensor | |
domain: automation | |
source_url: https://gist.github.com/Lucas-Steinmann/c2c93df7e91b2bfd8920d56f7c38dc40/edit | |
input: | |
heating_target: | |
name: Heater | |
selector: | |
entity: | |
domain: climate | |
#entity is not specified cause it should also be possible to use groups | |
window_entity: | |
name: Window Sensor | |
selector: | |
entity: | |
variables: | |
heating_target: !input heating_target | |
trigger: | |
platform: state | |
entity_id: !input window_entity | |
from: "off" | |
to: "on" | |
condition: | |
- condition: state | |
entity_id: !input heating_target | |
attribute: hvac_action | |
state: heating | |
action: | |
- service: climate.set_hvac_mode | |
entity_id: !input heating_target | |
data: | |
hvac_mode: "off" | |
- wait_for_trigger: | |
platform: state | |
entity_id: !input window_entity | |
from: "on" | |
to: "off" | |
- service: climate.set_hvac_mode | |
entity_id: !input heating_target | |
data: | |
hvac_mode: "heat" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment