Simple automation that pauses the climate entity when doors or windows are open and resumes last state once they are closed.
- Ability to set the time delay that doors/windows must be open or closed prior to automation triggering.
- Should not affect the system if HVAC is manually turned off prior to opening doors/windows upon reclosure of doors/windows.
- Should not affect system if HVAC is manually started while windows/doors open upon reclosure of doors/windows.
Needed to work
- Climate entity
- Group entity containing binary sensors that you want to pause HVAC system
- Automation assumes that when the group entity is ‘on’ that HVAC system should be paused.
Information on setting up a group entity: Group - Home Assistant (home-assistant.io)
- Used climate state value instead of Hvac action attribute to determine if automation should resume HVAC.
- Re-wrote to include a condition to prevent automation from firing when HVAC is already off.
- Uses “climate.set_hvac_mode” instead of “climate.turn_off”
Feel free to keep me updated on your experience with this automation if you choose to use it!
# ver 1.2 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" mode: single 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 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' - wait_for_trigger: - platform: state entity_id: !input doors_windows from: 'on' to: 'off' for: hours: 0 minutes: !input resume_delay_mins seconds: !input resume_delay_secs continue_on_timeout: false - scene: scene.climate_snapshot