Last active
February 1, 2025 13:57
-
-
Save Redblockmasteur/d3602266850016123b55d278f95ba8d4 to your computer and use it in GitHub Desktop.
WindowGuard Climate Control
This file contains hidden or 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: WindowGuard Climate Control | |
description: This blueprint intelligently manages your heating or cooling systems based on window sensor activity, conserving energy by suspending climate control when a window is open and restoring settings after user-defined delays for opening and closing the window. | |
domain: automation | |
input: | |
window_sensor: | |
name: Window Sensor | |
description: Select the sensor that monitors your windows. Useful for controlling heating or cooling based on window status. | |
selector: | |
entity: | |
domain: binary_sensor | |
device_class: window | |
target_climate: | |
name: Climate Control Entity | |
description: Choose the climate control entity to manage, like your heater, AC, or thermostat. | |
selector: | |
entity: | |
domain: climate | |
window_open_delay: | |
name: Delay After Window Opens | |
description: Time to wait after the window opens before suspending climate control. | |
default: 0 | |
selector: | |
number: | |
min: 0 | |
max: 300 | |
unit_of_measurement: seconds | |
window_close_delay: | |
name: Delay After Window Closes | |
description: Time to wait after the window closes before restoring climate control settings. | |
default: 0 | |
selector: | |
number: | |
min: 0 | |
max: 300 | |
unit_of_measurement: seconds | |
trigger: | |
- platform: state | |
entity_id: !input window_sensor | |
action: | |
- choose: | |
- conditions: | |
- condition: state | |
entity_id: !input window_sensor | |
state: "on" | |
sequence: | |
- delay: !input window_open_delay | |
- service: climate.turn_off | |
target: | |
entity_id: !input target_climate | |
- service: scene.create | |
data: | |
scene_id: "{{ target_climate | replace('.', '_') }}_snapshot" | |
snapshot_entities: !input target_climate | |
- conditions: | |
- condition: state | |
entity_id: !input window_sensor | |
state: "off" | |
sequence: | |
- delay: !input window_close_delay | |
- service: scene.turn_on | |
target: | |
entity_id: "scene.{{ target_climate | replace('.', '_') }}_snapshot" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HA yaml is a mystery to me, not sure if there is concurrency. For me it failed quite often, it works since moved
scene.create
in front ofclimate.turn_off