Door left open: timed escalation instead of an instant alarm
A door left open escalates in three stages — a soft chime at 90 seconds, a spoken reminder at 5 minutes, a repeated alert at 15 minutes — because a fridge run should not sound like a burglary.
# HearthNodes recipe 26 - door left open escalation
alias: "Safety - exterior door left open escalates"
id: hn_safety_door_left_open
description: "Chime at 90 s, spoken reminder at 5 min, repeated alert at 15 min"
mode: restart
max_exceeded: silent
trigger:
- platform: state
entity_id:
- binary_sensor.front_door
- binary_sensor.side_door
- binary_sensor.garage_door
to: "on"
for: "00:01:30"
variables:
door: "{{ trigger.entity_id }}"
door_name: "{{ state_attr(trigger.entity_id, 'friendly_name') }}"
outdoor_c: "{{ states('sensor.outdoor_temperature') | float(15) }}"
condition:
- condition: state
entity_id: input_boolean.moving_furniture_mode
state: "off"
- condition: template
value_template: >-
{{ is_state('person.primary','home') or is_state('person.partner','home') }}
- condition: numeric_state
entity_id: sensor.outdoor_temperature
above: -10
action:
- service: media_player.play_media
target:
entity_id: media_player.kitchen_display
data:
media_content_id: "chime_door_hint"
media_content_type: "music"
extra:
volume: 0.3
- delay: "00:03:30"
- service: tts.speak
target:
entity_id: tts.speaker_hall
data:
message: "The {{ door_name }} is still open"
cache: false
- delay: "00:10:00"
- repeat:
while:
- condition: state
entity_id: "{{ door }}"
state: "on"
sequence:
- service: media_player.play_media
target:
entity_id: media_player.kitchen_display
data:
media_content_id: "chime_door_alert"
media_content_type: "music"
- service: notify.mobile_app_primary
data:
title: "{{ door_name }} still open"
message: "Open for more than 15 minutes. Outdoor {{ outdoor_c }} C."
- delay: "00:01:00"
- choose:
- conditions:
- condition: template
value_template: "{{ outdoor_c | float(15) < 5 }}"
sequence:
- service: climate.set_preset_mode
target:
entity_id: climate.hall_thermostat
data:
preset_mode: "door open"
# A contact stuck reporting 'open' forever must never spam the house: stale
# contacts are excluded from the escalation and raised as low priority maintenance
# instead. Announcements are restricted to hall and kitchen speakers, with a
# notification-only path between 21:00 and 07:00.
Trigger · state
binary_sensor.front_door · binary_sensor.side_door · binary_sensor.garage_door
Any exterior door contact stays open for 90 seconds.
Step-by-step
- media_player.kitchen_displayA single soft chime at 90 seconds, quiet enough to be a hint rather than an announcement.
play chime · volume 0.3 · at 90 s - tts.speaker_hallA spoken reminder naming the specific door at 5 minutes, which is the stage that catches people who left the door open across a whole room.
speak 'The front door is still open' at 5 min - media_player.* · notify.mobile_appFrom 15 minutes, repeat every minute on all indoor speakers and push a notification, because at that point it is genuinely being ignored.
repeat alert every 60 s from 15 min - climate.hall_thermostatSuspend heating near the open door so the system does not heat the street for the duration.
set_back · 'door open' mode
Escalate, do not alarm
An instant alarm on an open door trains people to disable the automation within a week. Three stages over 15 minutes matches how people actually behave: a hint, a reminder, then a real alert. Measure your household's response and move the stages, but keep three of them.
Name the door, every time
'A door is open' makes people check three doors. 'The garage door is still open' makes them close one. This requires separate entities per door and TTS rather than a generic chime — worth the extra hardware for the seconds it saves in cold weather.
Add a moving-furniture mode
Without an override, the first time someone carries a sofa through the front door they will disable the automation permanently. One boolean on a dashboard, auto-clearing after 2 hours, prevents the automation from being killed by the one day a year it is wrong.
Hardware
| Model | Protocol | Link | Role in this chain |
|---|---|---|---|
| Matter door contacts on every exterior door | matter |
wireless | One per exterior door; a single shared contact cannot name which door is open, which is the whole point of the escalation. |
| Indoor speakers with TTS support | matter |
wired | Hall and kitchen speakers are enough; announcements in bedrooms are counterproductive at night. |
| Outdoor temperature sensor | matter |
wireless | Supplies the 'should this door be open at all' check, which shortens the first two stages in freezing weather. |
When it fails
If a contact goes offline, its door is excluded from the escalation and a low-priority maintenance notification is raised — a stuck contact that reports 'open' forever must never be allowed to spam the house. If the speakers are unreachable, the escalation falls back to mobile notifications only, which is quieter but still arrives.