Manage keypad codes for Zigbee locks on Home Assistant through ZHA.
Includes a simple side panel to view and edit codes, per lock settings, and an optional global Alarmo integration that disarms on successful keypad unlock.
- Home Assistant 2025.8 or newer
- Zigbee Home Automation (ZHA) integration with your lock entities
- A side panel named Zigbee Locks for code management
- Support for multiple locks, selectable at install time and later from Options
- Per lock settings managed in the panel:
- Name
- Max slots
- Slot offset
- Code management actions per slot:
- Set code
- Enable code
- Disable code
- Clear code
- Optional global Alarmo hook:
- On ZHA unlock from Keypad, the integration looks up the matching code and calls
alarm_control_panel.alarm_disarmwith that code
- On ZHA unlock from Keypad, the integration looks up the matching code and calls
- Codes are sent to the lock through ZHA services when you operate the panel using the below methods:
zha.set_lock_user_codezha.enable_lock_user_codezha.disable_lock_user_codezha.clear_lock_user_code
- The integration listens to
zha_eventand filters for:command: operation_event_notificationargs.operation: Unlockargs.source: Keypad
- When a keypad unlock occurs, it:
- Finds the lock by IEEE
- Applies the
slot_offsetto the reportedcode_slot - Decrypts the stored code for that slot
- If Alarmo is enabled, calls
alarm_control_panel.alarm_disarm(or your specified Alarmo entity name) with the code
Installation through HACS is the preferred installation method.
- Click the button above or go to HACS → Integrations → search for "ZHA Lock Manager" → select it.
- Press DOWNLOAD.
- Select the version (it will auto select the latest) → press DOWNLOAD.
- Restart Home Assistant then continue to the setup section.
- Go to the release page and download the zip attached to the latest release.
- Unpack the zip file and move
custom_components/zha_lock_managerto the following directory of your Home Assistant configuration:/config/custom_components/. - Restart Home Assistant then continue to the setup section.
Open your Home Assistant instance and start setting up by following these steps:
- Navigate to "Settings" → "Devices & Services"
- Click "+ Add Integration"
- Search for and select → "ZHA Lock Manager"
Or you can use the My Home Assistant Button below.
Follow the instructions to select your compatible lock(s) and optionally enable the Alarmo integration.
Open Settings → Devices and services → ZHA Lock Manager → Configure.
- Locks: pick which ZHA locks this integration manages. You can add or remove locks at any time.
- Enable Alarmo integration (Optional): enable the global Alarmo hook.
- Alarmo Entity: set your
alarm_control_panelentity.
Saving Options reloads the entry, updates the local store to match the selection, and refreshes the panel.
Open the Zigbee Locks panel from the sidebar.
- Left column: list of managed locks.
- Right column:
- Per lock metadata: Name, Max slots, Slot offset, Save.
- Slots table:
- Status shows Empty, Enabled, or Disabled
- Set prompts for a code and optional label, then programs the lock and stores the encrypted code
- Enable is active only when the slot has a code and is currently Disabled
- Disable is active only when the slot has a code and is currently Enabled
- Clear removes the code on the lock and clears label and status in the store
- Max slots: how many numeric slots you want to manage in the panel. This does not change the lock hardware limit.
- Slot offset: offset to apply when talking to the lock. Set this if your lock reports a
code_slotthat is shifted from the numbers you see in the UI.
- Codes are stored encrypted using a Fernet key that is generated on first load and saved in HA storage.
- Encryption and data files are under
.storagewith private access enabled. - Removing a code from a slot clears the encrypted token, sets the slot to Disabled, and clears the label.
- Removing the integration wipes all stored data and the encryption key, and removes the panel.
- Deleting the integration entry removes the sidebar panel and unsubscribes event listeners.
- Stored lock data and the encryption key are deleted.
- Reinstalling starts with an empty list of locks.
- Alarmo does not disarm on keypad unlock
- Confirm the code exists in the manager for that slot, and that
slot_offsetis correct. - Confirm Enable Alarmo integration is checked in Options and the
alarm_control_panelentity is valid. - The disarm hook only fires for
source: Keypad.
- Confirm the code exists in the manager for that slot, and that
- The panel does not pull existing codes from the lock at install time. It manages codes that you set through the panel.
- Some lock models enforce timing or rate limits on code changes. If a service call fails, retry after a short delay.
- Max slots is a UI limit. Your lock may support fewer or more slots. Use a value that matches your hardware.
Bug reports and pull requests are welcome.
Please include your Home Assistant version, a description of the lock model, and clear steps to reproduce.
MIT
