Disclaimer
Blueprints aren’t exclusive to Aqara brand locks & sensors, they work with any smart lock, contact sensor, and or presence sensor with correct devices classes in home assistant. This mega pack is designed to get a novice up and running quickly with ease. Inspiration to make this was having to reset my entire home assistant server several times and the pain of remaking the basic automation over and over again. Highly recommend you flagged this and keep it handy. I’m also welcome to user improving this so all can benefit.
Contact Sensors
For Windows & Doors Without Smart Locks
Locks
For Doors With Smart Locks
Locks & Contact Sensors
For Doors With Both Smart Locks & Contact Sensors
Presence Sensors
General Purpose For Presence/Motion Based Automations
Locks
1) Locks
- Auto-lock after the door reports closed (delay slider) with “re-open” cancellation and final re-check.
- Announcements for LOCKED/UNLOCKED (lock)—only after confirmed state changes.
- Optional reminders while door lock UNLOCKED, repeating every X seconds until resolved.
- Speech is queued (no overlap), with a small TTS pre-roll to prevent clipped words.
Mode: queued
(max 2) — prevents overlapping TTS when multiple messages fire.
Locks & Contact Sensors
2) Locks & Contact Sensors
- Auto-lock after the door reports closed (delay slider) with “re-open” cancellation and final re-check.
- Announcements for OPENED/CLOSED (sensor) and LOCKED/UNLOCKED (lock)—only after confirmed state changes.
- Optional reminders while door OPEN or lock UNLOCKED, repeating every X seconds until resolved.
- Optional action on OPEN: turn on chosen lights/switches.
- Speech is queued (no overlap), with a small TTS pre-roll to prevent clipped words.
Mode: queued
(max 2) — prevents overlapping TTS when multiple messages fire.
Contact Sensors
3) Contact Sensors
- OPENED/CLOSED announcements using the entity’s Area name for natural phrases.
- Optional “still open” reminder every X seconds until the sensor closes.
- Optional action on OPEN: turn on selected lights/switches.
- Clean queueing and TTS pre-roll for reliable, non-clipped speech.
Mode: queued
(max 2).
Presence Sensors
4) Presence Sensors)
- Announces “Presence detected in .” and “ cleared.”
- Optional mobile notifications to selected Home Assistant Companion App devices.
- Device control: turn ON after presence holds X seconds; turn OFF after clear holds Y seconds (0 = instant).
- TTS pre-roll for clean speech; actions are fast, holds configurable.
Mode: restart
— the newest presence state wins immediately.
Why these blueprints?
Why these blueprints?
- Snappy & dependable: Guarded flows (re-open cancels auto-lock, final checks, optional stability windows).
- Natural speech: All phrasing is Area-aware (e.g., “Bedroom door was closed.” / “Presence detected in Hallway.”).
- TTS that doesn’t clip: Optional pre-roll (150–200 ms typical).
- Engine-agnostic speech: Works with standard
tts.speak
. If your engine supportsoptions.voice
(e.g., Piper, Edge TTS, Polly), a voice can be used; engines like Google Translate are called without unsupported options—no errors. - Zero overlap:
mode: queued
(locks/sensors) ensures messages play in order; presence usesrestart
for urgency.
Setup (quick start)
Setup (quick start)
Contact Sensors / Locks & Contact Sensors
- Pick your contact sensor (ON = open, OFF = closed).
- For the combo blueprint, also pick your lock.
- Enable Speak announcements, choose your TTS engine (e.g.,
tts.piper
,tts.google_translate_*
) and speakers. - Tune Auto-lock delay; optionally set a closed stability window.
- (Optional) Enable reminders and choose interval; set actions on OPEN if you want lights to turn on.
Presence Sensors
- Select the presence/occupancy sensor.
- (Optional) Enable Speak presence announcements (+ TTS + speakers).
- (Optional) Enable mobile notifications and pick your Companion App devices.
- (Optional) Choose turn ON/OFF entities and hold timers (0–10 s).
Tip: Assign your devices to Areas (Settings → Areas). The Area name is used in all default speech.
Options & defaults (highlights)
Options & defaults (highlights)
- Auto-lock delay: 0–60 s (typical 8–15 s).
- Closed stability window: 0–10 s (default 2 s) to filter sensor bounce.
- Reminder interval: 15–120 s (default 30 s).
- TTS pre-roll: 0–300 ms (default 150 ms).
Compatibility notes
Compatibility notes
- Works with Aqara and standard HA entities:
binary_sensor
(device classes: door/opening/window, occupancy/motion)lock
media_player
(for TTS)
- TTS engines tested include Piper and Google Translate. If an engine doesn’t support a
voice
option, the call is sent without it—no errors.
Feedback / Issues
If anything’s unclear or you’ve got ideas for improvements (extra guards, additional TTS engines, presence zones), drop a comment. Enjoy!