Hi folks,
I’m new to Home Assistant (via HAOS) and am moving over from SmartThings.
I’ve been working on setting up an automated alarm arm/disarm system using Home Assistant automations, persons/zones, and Alarmo, and since I’m new to this, I wanted to reach out for any feedback from the community on if I’ve missed anything or am making any ignorant mistakes (or alternatively, if I’m on the right track, perhaps others will find this useful). Through my testing thus far, it appears to be working as expected.
The main use cases I have are:
- Automatically arm the system when everyone leaves
- Automatically disarm the system when anyone arrives
- Automatically arm the system into night mode around the time everyone goes to bed
- Automatically disarm the system in the morning when people are present
I’m using “Person” and Zone entities to track presence for my wife and I, using both the companion app for GPS as well as our network presence via the router.
Automation 1: Arm when everybody leaves
alias: "Alarm: When nobody is present, arm"
description: ""
trigger:
- platform: numeric_state
entity_id:
- zone.home
below: 1
condition: []
action:
- device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: arm_away
mode: single
Automation 2: Disarm when anyone arrives
This one looks at the home zone’s state to see if anyone is present and disarm the system if so.
alias: "Alarm: When anyone is present, disarm"
description: ""
trigger:
- platform: numeric_state
entity_id: zone.home
above: 0
condition: []
action:
- device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: disarm
mode: single
Automation 3: Disarm if someone unlocks the front door via the keypad door lock
This one is if a guest etc. visits the house and uses a code to unlock the door. I might have over-complicated it a bit by having the conditional check to see if the system is actually armed before doing the disarm – this could probably be removed to simply always disarm the system regardless of its current state.
alias: "Alarm: Disarm if front door is unlocked with code"
description: ""
trigger:
- platform: device
device_id: b118f62e8cae1179bbed81d96dae5e8e
domain: lock
entity_id: 7298ce4bf1e7605b8a06ab5d762f82a1
type: unlocked
condition:
- condition: or
conditions:
- condition: device
device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: is_armed_away
- condition: device
device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: is_armed_night
action:
- device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: disarm
mode: single
Automation 4: Arm at night
This one uses an arbitrary time (11:45pm in this case) to arm the system. As noted in the description, it looks to see if the system was already disarmed before enabling armed night, because I don’t want this to happen if the system was already armed (i.e. we were away).
alias: "Alarm: Arm at night"
description: >-
Enable Armed Night mode if the system was already disarmed (i.e. someone is
home). If not in disarmed mode, then it won't enable night mode (which is
good, because we want to stay in Armed Away in that case).
trigger:
- platform: time
at: "23:45:00"
condition:
- condition: device
device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: is_disarmed
action:
- device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: arm_night
mode: single
Automation 5: Disarm in the morning
This is the complement to the “arm at night” rule, and similar to that rule, it first checks if the system was already in armed night mode because I don’t want the system disarming if we are away.
alias: "Alarm: Disarm in morning"
description: >-
If the system was previously in the armed_night mode, then disarm
automatically in the morning. armed_night mode should only engage if someone
is present, so therefore this disarm step will only happen if someone is
present as well.
trigger:
- platform: time
at: "07:00:00"
condition:
- condition: device
device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: is_armed_night
action:
- device_id: c6613f8e40fa8575cf6c89d0e95ecb0c
domain: alarm_control_panel
entity_id: 388b302d4237b9ed9852ebfc070b1842
type: disarm
mode: single
Thank you for any feedback or suggestions!