-
-
Save danieleparazza/0342467484089d815152d274408bcab1 to your computer and use it in GitHub Desktop.
HA HVAC Pause Blueprint V2
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: HVAC Pause | |
description: Pauses HVAC when windows/doors open; resumes last state once closed | |
domain: automation | |
input: | |
paused_state: | |
description: Paused status input_select. | |
name: Paused State Input Select | |
selector: | |
entity: | |
domain: input_select | |
hvac_mode: | |
description: HVAC mode input_select. (Stores HVAC mode while paused) | |
name: HVAC Input Select | |
selector: | |
entity: | |
domain: input_select | |
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: 120 | |
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: 120 | |
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" | |
# Translates inputs to variables for use in templates. | |
variables: | |
climate_device: !input climate_device | |
hvac_mode: !input hvac_mode | |
paused_state: !input paused_state | |
mode: single | |
trigger: | |
# Detects if group entity is on | |
- 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 | |
# Detects if group entity is 'off' | |
- 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_secs | |
condition: [] | |
action: | |
# Checks if HVAC paused input_select is in 'run', the group entity is 'on' | |
# and that the climate entity is not 'off' | |
- choose: | |
- conditions: | |
- condition: and | |
conditions: | |
- condition: state | |
entity_id: !input paused_state | |
state: run | |
- condition: trigger | |
id: group_open | |
- condition: not | |
conditions: | |
- condition: state | |
entity_id: !input climate_device | |
state: 'off' | |
# Sets the HVAC input_select to current state of climate device | |
sequence: | |
- service: input_select.select_option | |
target: | |
entity_id: !input hvac_mode | |
data: | |
option: '{{ states(climate_device) }}' | |
# Sets the climate device to 'off' | |
- service: climate.turn_off | |
target: | |
entity_id: !input climate_device | |
# Sets the HVAC paused input_select to 'paused' | |
- service: input_select.select_option | |
target: | |
entity_id: !input paused_state | |
data: | |
option: paused | |
# Checks if HVAC paused input_select is 'paused' and the group entity is 'off' | |
- conditions: | |
- condition: and | |
conditions: | |
- condition: state | |
entity_id: !input paused_state | |
state: paused | |
- condition: trigger | |
id: group_close | |
# Sets the climate device to current state of HVAC input_select and | |
# sets the HVAC paused input_select to 'run' | |
sequence: | |
- service: climate.set_hvac_mode | |
target: | |
entity_id: !input climate_device | |
data: | |
hvac_mode: '{{ states(hvac_mode) }}' | |
- service: input_select.select_option | |
target: | |
entity_id: !input paused_state | |
data: | |
option: run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🔄 HVAC Pause Blueprint – Changelog v1.7.1 → v2.0.0
This changelog explains the key improvements and structural changes introduced in version 2.0.0 of the
HVAC Pause
blueprint compared to version 1.7.1.✅ Major Improvements in v2.0.0
1. Manual State Snapshot (No More
scene.create
)scene.create
to store HVAC state.hvac_mode
(viastates()
)temperature
target_temp_low
,target_temp_high
preset_mode
,fan_mode
,swing_mode
scene.create
well (e.g. Samsung SmartThings).2. Conditional Restore Logic
3. Reliable State Change Confirmation
climate.set_*
action is followed by await_for_trigger
to ensure the change is reflected in the entity’s state.preset_mode
, waits for thepreset_mode
attribute to update.4. Null-safe Compatibility
is number
oris string
before setting.5. Wait-for-Resumed HVAC State
climate.set_hvac_mode
, the automation waits until the climate entity’s state is no longeroff
before proceeding.🛠 Best Use Cases
scene.create
is insufficient