Lock Code Manager is a Home Assistant integration that keeps PIN codes in sync across one or more locks, even across different lock providers (e.g. Z-Wave and Matter locks sharing the same codes). Define your codes once and Lock Code Manager handles setting, clearing, and monitoring them on every lock.
Features:
- Synchronize PIN codes across multiple locks and providers
- Automatic sync — codes are set and cleared as needed, with retry and drift detection
- Condition entities control when a code is active:
calendar— active during eventsbinary_sensor/switch/input_boolean— active when onschedule— active during scheduled times
- Blueprints for usage limiting, calendar-driven PINs, and more
- Dashboard cards for managing codes and viewing lock status
Supported lock integrations:
| Integration | Read PINs | Push Updates | Code Events | Notes |
|---|---|---|---|---|
| Z-Wave | Varies | Yes | Yes | Some locks mask PINs |
| Matter | No | Yes | Yes | PINs write-only per spec |
| Schlage WiFi | No | No | No | Cloud-based, PINs masked |
| Akuvox¹ | Yes | No | No | Local API, polling-based |
| Virtual¹ | Yes | No | No | For testing only |
¹ Custom integration required (Local Akuvox, hass-virtual)
Adding support for new lock integrations is straightforward — see the Adding a Provider guide. Contributors welcome!
Some lock integrations cannot currently be supported due to limitations in their underlying libraries. See the wiki for details.
Some condition entity integrations are not compatible. See the wiki for details.
The best way to install this integration is via HACS.
- Set up your locks in Home Assistant through a supported integration (Z-Wave, Matter, Schlage, etc.)
- Add this repository as a custom integration repository in HACS
- Go to Settings > Devices & Services > Add Integration
- Select Lock Code Manager
- Follow the prompts - additional information about the configuration options are available in the Wiki
Pre-built automations for common patterns:
- Slot Usage Limiter — Disable a slot after a set number of uses
- Calendar PIN Setter — Extract and set PINs from calendar event attributes
- Calendar Condition — Control slot access based on calendar events
See the wiki for detailed setup and configuration.
Visit the Wiki for detailed documentation including configuration, troubleshooting, dashboard setup, and development guides.
Lock Code Manager provides Lovelace strategies and custom cards for managing PINs. See the wiki for configuration options and setup guidance.
I spent some time contributing to keymaster,
and what I learned working on it, and the regular complaints users had about it generating
too many automations, entities, etc. led me to take a different approach. This isn't a
knock on keymaster, unfortunately a lot of what is built in this integration wasn't
possible for most of keymaster's life. I briefly considered implementing this into
keymaster but:
keymasteris still a great solution that works as is.keymasteris surprisingly simple under the hood because it makes Home Assistant do a lot of the heavy lifting for figuring out when to enable and disable a usercode. This integration, on the other hand, attempts to do all of the heavy lifting internally in code, which means it will generate less entities and automations but it is likely more fragile to changes in HA Core or even changes in the codebase.- It would be impossible to seamlessly migrate users from the current implementation of
keymasterto this integration's implementation. Rewritingkeymasterto do this would have been the equivalent of creating a new integration anyway.
A big thank you to the other keymaster maintainers:
- @FutureTense
- @firstof9
As well as the person who created the base concept that keymaster evolved from:
@ptdalen