This blueprint provides a comprehensive, flexible alarm system solution that works natively with Home Assistant. No custom components required. Perfect for home security, office monitoring, or any security application, it delivers a responsive and user-friendly experience.
Whatâs New:
This latest version merges and enhances my previous Z2M and ZHA-specific blueprints with significant new features and improvements.
Important Note:
Starting with version 2025.12.0 there is no upgrade path from the old versions, so you should set it up again. Many of the inputs are reused, but not all.
Links:
Version:
- 2025.12.11 Fix invalid trigger enabled templates causing sensor triggers to fail
- 2025.12.10 Add dashboard keypad support with script-based implementation
- 2025.12.9: Fix schedule day validation and refactor descriptions
- 2025.12.8: Fix dynamic alarm action template to use correct service names
- 2025.12.7: Initial release (small fix)
- 2025.12.6: initial release version of blueprint
- 2025.12.5: Optimize automation logic with template-driven approach
- 2025.12.4: Replace fixed disarm/night schedules with flexible mode selection
- 2025.12.3: Extend notification system with critical alerts and channel control
- 2025.12.2: Add presence-based alarm automation with flexible scheduling
- 2025.12.1: Optimize alarm system blueprint notifications
- 2025.12.0: First combined Z2M/ZHA Blueprint version
Features:
- Multiple Keypad Options: Choose Z2M, ZHA, Dashboard, or any combination
- Physical Zigbee Keypads: Sync states with Z2M or ZHA (tested with frient KEPZB-110)
- Dashboard Keypad: Custom on-screen numeric keypad for wall tablets/panels or Companion App
- Multiple User Codes: Unlimited user codes with support for PIN codes (digits) and RFID tags (hexadecimal: 0-9/A-F) (pattern:
^[0-9A-F+]+$) - Two-Tier Code System: Blueprint validates user codes, then sends master code to alarm panel - your alarm panel doesnât need to support multiple codes
- Smart Automation: Auto-arm when leaving, auto-disarm on arrival, flexible time-based schedules (weekday/weekend/custom)
- Rich Notifications: Text notifications with camera feeds (iOS live/Android snapshot), TTS announcements, critical alerts
- Mode-Specific Configuration: Different sensors and actions for Away/Home/Night/Arming/Pending/Disarmed/Triggered/Emergency modes
- Emergency Mode: Silent alarm via keypad SOS button (long-press 5+ seconds) (physical keypads only)
Prerequisites
- Home Assistant 2024.8.0 or later
- Manual Alarm Control Panel (see setup below)
- Text Helper entities for storing codes (see setup below)
- Physical Zigbee keypad connected via Z2M or ZHA (optional)
- Dashboard helper entities if using Dashboard keypad (see setup below)
Known issues:
- ZHA doesnât support all features available in Z2M, as some alarm states are missing from the ZHA implementation. While arming, disarming, and state synchronization work correctly with this blueprint, the keypadâs beeping patterns and LED status indicators may not display accurately.
- ZHA currently has a bug affecting LED indicators on the keypadâthey donât accurately reflect the actual alarm state. An open issue is tracking this problem.
Getting Started:
- Download & Install the Blueprint:
Everything is explained in the Blueprint as well, but some instructions below.
- Select the required entities:
Follow the instructions in the Blueprint. If you donât have all the entities needed, see below how to create.
- Create a Text Helper, per code you want to use:
pattern: "^[0-9A-F+]+$"
You can create the Text Helper directly from the GUI of the blueprint or itâs also possible through YAML, see below.
-
Setup the Zigbee integration of your choice, you can even use both :
-
Setup the Automation
-
Setup the Notifications and/or Announcements, if you want to use them
-
Setup the sensors, notifications, scripts and cameras you want to use per Alarm state:
YAML setup:
I find it easy to split my config into packages, so I can easily find different yaml entities related to specific device type. You can include the following in your Home Assistant config:
homeassistant:
packages: !include_dir_named packages
Make sure to create packages folder in your /config/ directory.
I created a file called alarm.yaml in my packages folder with the following contents:
alarm_control_panel:
- platform: manual
name: Alarm
code_arm_required: false
armed_away:
arming_time: 30
delay_time: 20
armed_home:
arming_time: 0
delay_time: 20
armed_night:
arming_time: 0
delay_time: 20
input_text:
alarm_code_user_1:
name: Alarm Code User 1
icon: mdi:dialpad
min: 1
max: 16
mode: password
pattern: "^[0-9A-F+]+$"
alarm_code_user_2:
name: Alarm Code User 2
icon: mdi:dialpad
min: 1
max: 16
mode: password
pattern: "^[0-9A-F+]+$"
alarm_code_user_3:
name: Alarm Code User 3
icon: mdi:dialpad
min: 1
max: 16
mode: password
pattern: "^[0-9A-F+]+$"
alarm_code_user_name:
name: Alarm Code User Name
icon: mdi:account
min: 0
max: 100
template:
- binary_sensor:
- name: "Presence"
unique_id: presence
device_class: presence
state: >
{{ (states('zone.home') | int) > 0 }}
This creates the manual alarm_control_panel, which this Blueprint uses as the controller of your Alarm system. You can select a different arming_time and delay_time per mode.
The Template Binary Sensor automatically tracks the users in zone.home, change it to a different zone.name if you want to track a different zone.
As I am using the Packages option, I can also put my Text Helpers in the same .yaml file to keep everything together.
After creating the Text Helpers in YAML or in the GUI you can set the pincodes yourself.
The content of the Text Helper is stored in your HA database, so is âsafeâ in there. As an admin you can see the state of the Helper and see the stored code, but in your Automations the code is not visible.
You can also set the code with an Action on the Dev Tools page.
action: input_text.set_value
target:
entity_id: input_text.alarm_code_user_1
data:
value: "1234"
Join the Community:
I canât wait to see how you all use this Blueprint to enhance your smart homes. Please share your experiences, tips, and any creative uses you come up with. Together, we can make our homes smarter and more connected than ever!
Happy automating! ![]()









