Skip to content

Instantly share code, notes, and snippets.

@danieleparazza
Forked from raffy-ops/hvac_pause.yaml
Last active January 6, 2025 18:33
Show Gist options
  • Save danieleparazza/0342467484089d815152d274408bcab1 to your computer and use it in GitHub Desktop.
Save danieleparazza/0342467484089d815152d274408bcab1 to your computer and use it in GitHub Desktop.
HA HVAC Pause Blueprint
# ver 1.1
blueprint:
name: HVAC Pause
description: Pauses HVAC when windows/doors open; resumes last state once closed
domain: automation
input:
climate_device:
description: Climate entity used for climate control.
name: Climate Device
selector:
entity:
domain: climate
doors_windows:
description: Group of entities that will activate automation. (Assumes 'on' means 'open')
name: Door and window sensors.
selector:
entity:
domain: group
pause_delay_mins:
description: Time to wait before pausing HVAC in minutes.
name: Pause Delay Minutes
default: 5
selector:
number:
min: 0
max: 60
unit_of_measurement: "Minutes"
pause_delay_secs:
description: Time to wait before pausing HVAC in seconds.
name: Pause Delay Seconds
default: 0
selector:
number:
min: 0
max: 59
unit_of_measurement: "Seconds"
resume_delay_mins:
description: Time to wait before resuming HVAC in minutes.
name: Resume Delay Minutes
default: 0
selector:
number:
min: 0
max: 60
unit_of_measurement: "Minutes"
resume_delay_secs:
description: Time to wait before resuming HVAC in seconds.
name: Resume Delay Seconds
default: 30
selector:
number:
min: 0
max: 59
unit_of_measurement: "Seconds"
trigger:
- platform: state
entity_id: !input doors_windows
from: 'off'
to: 'on'
for:
hours: 0
minutes: !input pause_delay_mins
seconds: !input pause_delay_secs
id: group_open
- platform: state
entity_id: !input doors_windows
id: group_close
from: 'on'
to: 'off'
for:
hours: 0
minutes: !input resume_delay_mins
seconds: !input resume_delay_mins
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: group_open
sequence:
- service: scene.create
data:
snapshot_entities: !input climate_device
scene_id: climate_snapshot
- service: climate.turn_off
target:
entity_id: !input climate_device
- conditions:
- condition: and
conditions:
- condition: state
entity_id: !input climate_device
state: 'off'
- condition: trigger
id: group_close
sequence:
- service: scene.turn_on
target:
entity_id: scene.climate_snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment