Forked from Redblockmasteur/WindowGuard_Climate_Control.yaml
Last active
February 1, 2025 14:07
-
-
Save fipski/3c4e4fb72313ab5a3e0dd9e4ad42030d 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: Cusotm climate from binary sensor | |
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 | |
multiple: false | |
target_climate: | |
name: Climate Control Entity | |
description: Choose the climate control entity to manage, like your heater, | |
AC, or thermostat. | |
selector: | |
entity: | |
domain: | |
- climate | |
multiple: false | |
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.0 | |
max: 300.0 | |
unit_of_measurement: seconds | |
step: 1.0 | |
mode: slider | |
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.0 | |
max: 300.0 | |
unit_of_measurement: seconds | |
step: 1.0 | |
mode: slider | |
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: scene.create | |
data: | |
scene_id: "{{ target_climate | replace('.', '_') }}snapshot" | |
snapshot_entities: !input target_climate | |
- service: climate.turn_off | |
target: | |
entity_id: !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 | |
- service: scene.delete | |
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
Changed sensor to binary sensor, since my sensors are not in the window domain
Changed the naming of the scene. Don't know why it didn't work, I think the
snapshot_entities: !input target_climate
fixed it for me....Changed the order of scene.create and heating tun_off
Deleted the scene after turning the heating on for good measure