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.4
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
- binary_sensor
pause_delay:
description: Time to wait before pausing the HVAC system.
name: Pause Delay
default:
hours: 00
minutes: 05
seconds: 00
selector:
duration:
resume_delay:
description: Time to wait before resuming the HVAC system.
name: Resume Delay
default:
hours: 00
minutes: 00
seconds: 30
selector:
duration:
pause_action:
description: Optional additional action to perform when climate entity is paused.
name: Pause Action (Optional)
default: []
selector:
action:
resume_action:
description: Optional additional action to perform when climate entity resumes.
name: Resume Action (Optional)
default: []
selector:
action:
variables:
pause_action: !input pause_action
resume_action: !input resume_action
mode: single
trigger:
- platform: state
entity_id: !input doors_windows
from: 'off'
to: 'on'
for: !input pause_delay
id: group_open
condition:
- condition: not
conditions:
- condition: state
entity_id: !input climate_device
state: 'off'
action:
- service: scene.create
data:
scene_id: climate_snapshot
snapshot_entities: !input climate_device
- service: climate.set_hvac_mode
target:
entity_id: !input climate_device
data:
hvac_mode: 'off'
- choose:
- conditions: '{{ pause_action is defined }}'
sequence: !input pause_action
- wait_for_trigger:
- platform: state
entity_id: !input doors_windows
from: 'on'
to: 'off'
for: !input resume_delay
continue_on_timeout: false
- scene: scene.climate_snapshot
- choose:
- conditions: '{{ resume_action is defined }}'
sequence: !input resume_action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment