Start thermostat when windows and doors are closed

Once all windows and doors are closed, it’s time to resume climate control. This automation restores your HVAC system to continue heating or cooling your home.

Use cases

Automatic Comfort

  • After Airing Out - All windows and doors have been closed after bringing in fresh air
  • Resume Normal Comfort - Restore temperature control automatically
  • Seamless Experience - Climate control adapts without manual intervention

Efficiency

  • Energy Optimization - Don't waste time with HVAC off when windows are closed
  • Return from Nice Weather - Automatically resume when outdoor conditions change

Products needed

Essential Equipment

Smart Thermostat
Popular brands: Nest, Ecobee, Honeywell, Sensi
WiFi or Zigbee enabled • API control • Mode restoration capability
Contact Sensors
Popular brands: Aqara, Wyze, SmartThings, Ring
Must match sensors used in "stop thermostat" automation • Cover all monitored windows/doors

Optional Enhancements

Temperature Sensor
Verify indoor temp before resuming (safety check)
Variable/Helper
Store previous thermostat state for accurate restoration

Basic automation setup

IF all windows closed THEN restore thermostat to previous mode AND send notification "Climate control resumed"

Triggers

  • Any window or door closes

Conditions

ALL windows and doors are closed: Critical condition
Thermostat is currently off
Optional: Indoor temperature outside comfortable range

Actions

  • Turn on thermostat
  • Restore previous mode (heat/cool/auto)
  • Optional: Restore previous temperature setpoint
  • Optional: Send notification "Climate control resumed"

Platform-specific examples

Home Assistant logo

Home Assistant

Trigger Any window or door closes
Condition ALL windows/doors closed AND thermostat is "off"
Action Restore thermostat to saved previous mode
Tip: Use group sensor for simplified "all closed" check
SmartThings logo

SmartThings

IF Living room window closes
AND ALL windows/doors closed AND Thermostat is "Off"
THEN Set thermostat mode to "Auto"
Hubitat logo

Hubitat

Trigger Any contact sensor closes
Condition All contacts closed AND thermostat is "off"
Action Restore thermostat to previous saved mode
Setup: Use Rule Machine with contact group
Apple HomeKit logo

Apple HomeKit

When Any window or door closes
Condition All windows/doors closed, Thermostat is off
Do Turn on thermostat to Auto mode
Alexa logo

Alexa

When Smart Home sensor closes
Condition All windows/doors closed, Thermostat "Off"
Action Set thermostat to Auto mode
Google Home logo

Google Home

Starter Window sensor closes
Condition All windows and doors are closed
Action Set thermostat to Heat-Cool mode

Advanced features

Save and restore complete state

Store not just mode, but complete thermostat state using scene creation:

When stopping thermostat:

When resuming:

Delay before resuming

Wait a few minutes before resuming to ensure windows stay closed:

Add “for 2 minutes” delay to trigger - ensures windows remain closed before resuming

Temperature-based resume

Only resume if indoor temperature needs adjustment:

Use conditional logic checking indoor temperature and thermostat mode.

Smart scheduling

Don’t resume during times when HVAC would normally be off:

Add time condition: Only resume between 6 AM and 11 PM (not during sleep hours when thermostat would be in eco mode)

Troubleshooting

Issue: Thermostat doesn’t resume

Causes:

Solutions: ✅ Verify ALL sensors report closed state in app ✅ Check automation conditions - ensure every window/door sensor is listed ✅ Review automation logs - see which condition is failing ✅ Test state restoration - manually turn off thermostat and trigger automation ✅ Use group sensor (Home Assistant) or virtual sensor to simplify “all closed” check ✅ Add notification showing which sensors prevented trigger

Issue: Wrong mode restored

Causes:

Check:

Fix:

Issue: Thermostat resumes too quickly

Causes:

Solutions: ✅ Add “for: 2 minutes” delay to trigger - ensure windows stay closed ✅ Increase delay to 5 minutes during nice weather (encourage natural ventilation) ✅ Don’t resume if another window opened within 5 minutes ✅ Add temperature check: Only resume if temp outside comfortable range ✅ Consider time of day: Longer delays during pleasant weather hours


Related automations: