This automation is designed for emergency situations when the smoke alarm is triggered. It immediately ensures maximum visibility and access: lights turn on, automations start, shutters open, and the door unlocks automatically. 🛑
The goal is to facilitate evacuation for residents and provide emergency services with quick access – safety and comfort features are activated automatically. 🚒
The automation responds to the smoke detector status binary_sensor.rauchmelder_rauch
as soon as it changes to “on”. It checks whether someone is home. If so, the following actions take place:
The automation uses the single
mode to ensure it doesn't run multiple times in parallel. This prevents unwanted repetitions.
🔄
This automation only triggers if at least one resident is home. It checks the status of persons via Home Assistant’s presence detection, using entities like person.jimmybones
, person.jessi
, and person.philip
.
Presence detection helps avoid unnecessary activations when the house is empty—keeping your home secure and saving energy. It relies on technologies like GPS tracking, Wi-Fi network presence, Bluetooth beacons, or smart home integrations (e.g., Apple HomeKit or Google Home).
If nobody is home, the automation does not activate, preventing the door from unlocking or shutters opening unnecessarily.
Copy the following YAML configuration into your automations.yaml
file or use the Home Assistant UI editor. Adjust the entity_id
values to match your system.
alias: Smoke Alarm Trigger – Lights, Door, and Shutters (only if someone is home)
description: >
When smoke is detected, turns on lights, triggers automations, opens shutters,
and unlocks the door – but only if someone is home.
trigger:
- platform: state
entity_id: binary_sensor.rauchmelder_rauch
to: "on"
condition:
- condition: or
conditions:
- condition: state
entity_id: person.jimmybones
state: home
- condition: state
entity_id: person.jessi
state: home
- condition: state
entity_id: person.philip
state: home
action:
- service: automation.trigger
target:
entity_id:
- automation.wohnzimmer_an
- automation.philip_an
data:
skip_condition: true
- service: light.turn_on
target:
entity_id:
- light.nachttisch_2
- light.maya_decke
- light.maya_ecklampe_outlet
- light.kuche_links_outlet
- light.kueche_re_outlet
- light.badezimmer_led_2
- service: cover.open_cover
target:
entity_id:
- cover.rolladen_kuche_shutter
- cover.smart_roller_shutter_25031175141681700803c4e7ae14fb3f_shutter
- cover.smart_roller_shutter_25051532660378700801c4e7ae174b1c_shutter
- cover.smart_roller_shutter_25031176599363700803c4e7ae14fa40_shutter
- cover.smart_roller_shutter_25031108139493700803c4e7ae14fae0_shutter
- cover.smart_roller_shutter_25051501166180700801c4e7ae174b1a_shutter
- cover.smart_roller_shutter_25031162889772700803c4e7ae14fa9e_shutter
- cover.smart_roller_shutter_25051528484458700801c4e7ae174b23_shutter
- service: lock.unlock
target:
entity_id: lock.aqara_smart_lock_u200
mode: single
Step 1: Open Home Assistant and go to Settings > Automations or edit your automations.yaml
file.
Step 2: Paste the YAML code above or use the UI to create it.
Step 3: Ensure all entity_id
values match your devices.
Step 4: Reload automations or restart Home Assistant.
This automation greatly enhances the safety of your home – especially in critical situations where every second counts. ✅
It’s fast, well-structured, and a must-have for any smart-secured home. 🔥🚪💡