🚨 Alarm System with Keypad support (Z2M / ZHA / Dashboard) [KEPZB-110]

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:

:page_with_curl: My GitHub Repo
:blue_book: This blueprint

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:

  1. Download & Install the Blueprint:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Everything is explained in the Blueprint as well, but some instructions below.

  1. Select the required entities:

Follow the instructions in the Blueprint. If you don’t have all the entities needed, see below how to create.

  1. 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.

  1. Setup the Zigbee integration of your choice, you can even use both :

  2. Setup the Automation

  3. Setup the Notifications and/or Announcements, if you want to use them

  4. 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.

Open your Home Assistant instance and show your helper entities.
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"

Open your Home Assistant instance and show your action developer tools.

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! :blush:

3 Likes

I just released a new update, check the blueprint itself for details after updating:

  • 2025.12.9: Fix schedule day validation and refactor descriptions

Another update, which make this Blueprint fully usable without any physical Keypad.

  • 2025.12.10 Add dashboard keypad support with script-based implementation

    • Add dashboard keypad scripts for on-screen numeric input
    • Add blueprint documentation with script-based keypad setup
    • Organize dashboard config into collapsed “Setup Instructions” section
    • User name display shows for 5 seconds then clears
    • Add “Invalid Code” feedback for failed authentication attempts

It now has all the features I wanted to have myself. If there is anything that you are missing or want to change, let me know.

It isn’t working for me. I can’t get it to work. I set up all of the functions with the blueprint and when i use the dashboard that I made for it, nothing. The code process works but I doesn’t call the alarm system to arm or anything. Is there a script that I am missing?

In the Blueprint description there are several scripts shown under Dashboard Keypad - Setup Instructions, you can easily copy/paste this into the alarm.yaml file. Each button press has it’s own script, which is why it is easier to do it through YAML.

Also don’t forget to enable the Keypad integration with type Dashboard in the selections at the start of the Blueprint.

I did that and I got the numbers to work. It also matches your blueprint. But still no alarming functionality…

Ok, so you can see the dots when pressing the buttons in your Dashboard?

Can you share the YAML from the Blueprint settings? You can do this by going to the Automation section of your HA: /config/automation/dashboard and clicking on the Automation you made from my Blueprint. Click on the three dots in the top right and select Edit in YAML and share the YAML here.

If there are sensitive things in there you don’t want to share, you can mask the names.

description: ""
alias: Alarm System with Keypad support (Z2M / ZHA / Dashboard) (1)
use_blueprint:
  path: danielpetrovic/alarm-system-with-keypad.yaml
  input:
    alarm_control_panel_main: alarm_control_panel.alarm
    integration_type:
      - dashboard
    alarm_code_user:
      - input_text.alarm_code_user_1
      - input_text.alarm_code_user_2
    alarm_code_user_name: input_text.alarm_code_user_name
    alarm_dashboard_code: input_text.alarm_dashboard_code
    alarm_dashboard_action: input_text.alarm_dashboard_action
    alarm_presence_sensor: binary_sensor.home_members
    alarm_auto_arm_away: true
    alarm_auto_disarm_arriving: true
    alarm_schedule_weekdays_enabled: false
    alarm_schedule_weekends_enabled: false
    alarm_notifications_target:
      - mobile_app
      - mobile_app
      - mobile_app
    alarm_notifications_critical_armed_away: true
    alarm_sensor_away:
      - binary_sensor.sensor
      - binary_sensor.sensor
      - binary_sensor.sensor
    alarm_notifications_critical_armed_home: true
    alarm_notifications_critical_armed_night: true
    alarm_notifications_critical_arming: true
    alarm_notifications_critical_pending: true
    alarm_notifications_critical_disarmed: true
    alarm_default_user_name: Home Assistant

I just checked with your YAML in my Home Assistant environment, with the same entities/names, apart from the three you obviously masked. And it works as expected.

Did you create the helpers with the correct filters and do the user_codes only contain digits between 4-16 in length?

alias: Alarm Test
description: ""
use_blueprint:
  path: danielpetrovic/alarm-system-with-keypad.yaml
  input:
    alarm_control_panel_main: alarm_control_panel.alarm
    integration_type:
      - dashboard
    alarm_code_user:
      - input_text.alarm_code_user_1
      - input_text.alarm_code_user_2
    alarm_code_user_name: input_text.alarm_code_user_name
    alarm_dashboard_code: input_text.alarm_dashboard_code
    alarm_dashboard_action: input_text.alarm_dashboard_action
    alarm_presence_sensor: binary_sensor.presence
    alarm_auto_arm_away: true
    alarm_auto_disarm_arriving: true
    alarm_schedule_weekdays_enabled: false
    alarm_schedule_weekends_enabled: false
    alarm_notifications_target:
      - 123456790234sjkjdsflek2342 # randomized ID of mobile_app
    alarm_notifications_critical_armed_away: true
    alarm_sensor_away:
      - binary_sensor.entree_deursensor
    alarm_notifications_critical_armed_home: true
    alarm_notifications_critical_armed_night: true
    alarm_notifications_critical_arming: true
    alarm_notifications_critical_pending: true
    alarm_notifications_critical_disarmed: true
    alarm_default_user_name: Home Assistant

There are the helpers that I have currently:

And here are the scripts that it created:

Wait, never mind. I fixed something by just redoing the blueprint like 3 times lol. It seems to be fully working now!

Good to hear it was fixed, not sure what went wrong though :smiley: .

If you change the names of the Alarm Code User helpers in the YAML to be Alarm Code yourname , instead of Alarm Code User 1 (yourname) it will filter out just yourname for notifications / announcements.

Got it! :+1: Thanks!

I just released a new update. Please reimport your blueprint, as this was quite essential…

  • 2025.12.11 Fix invalid trigger enabled templates causing sensor triggers to fail