Skip to content

About

Lock code manager for locks integrated with Home Assistant

Topics

Resources

Stars

112 stars

Watchers

4 watching

Forks

Latest commit

 

History

1,331 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lock Code Manager

Lock Code Manager scales down to a simple UI for managing your lock's PIN codes — and scales up to a programmable, multi-lock, multi-provider PIN platform with scheduled access, condition-driven activation, and automation-ready services. Define your codes once and LCM handles setting, clearing, and monitoring them on every lock, across providers (Z-Wave, ZHA, Matter, and more) without you wiring up the differences.

Whether you just want a clean dashboard for your front door or you're rotating PINs across an Airbnb fleet on a nightly schedule, LCM has you covered.

Features:

  • Give each person a name and a PIN; Lock Code Manager works out which slot on which lock they land in
  • Synchronize PIN codes across multiple locks and providers
  • Automatic sync — every write is read back from the lock to confirm it, with retries and drift detection
  • Never touches codes it didn't create: a new user gets a slot number that's free on every lock in the configuration, and a lock you add or swap in later must have its users' numbers free, or it's refused until you clear them. Clearing or removing a user never deletes a lock user without Lock Code Manager's tag, and on Matter only PINs Home Assistant created are removed. The one exception is a lock that can't report its codes: Lock Code Manager warns you which slots it will use
  • Shows what each lock reports for each slot, including when a lock can't tell
  • Repairs tell you when a code can't be set or cleared, a lock is offline, or a lock was re-paired
  • Condition entities control when a code is active: a calendar, a schedule, or anything on/off. Any other state, such as people being home, works through a template binary sensor
  • Services and actions for managing users, PINs, and conditions from automations
  • Blueprints for usage limiting, calendar-driven PINs, and more
  • External keypads and code readers, such as an ESPHome keypad, checked against the same users and schedules
  • Guest and rental workflows
  • Dashboard strategies and custom cards, from one-line auto-generated dashboards to fully hand-composed layouts

Supported Integrations

Integration Read PINs Push Updates Code Events Notes
Z-Wave Varies ✅ ✅ Some locks mask PINs
ZHA ✅ ✅ ✅ Some locks can't report their PINs
Zigbee2MQTT (MQTT) Varies ✅ ✅ PIN support depends on the lock; some can't report their PINs
Z-Wave JS UI (MQTT) Varies ✅ ✅ For locks bridged through zwave-js-ui's MQTT gateway; the Z-Wave row is recommended
Matter ❌ ✅ ✅ PINs are write-only per the spec
Schlage WiFi ❌ ❌ ❌ Cloud-based, PINs masked
Akuvox¹ ✅ ❌ ❌ Local API, polling-based
Virtual¹ ✅ ❌ ✅ Try Lock Code Manager without a real lock
ESPHome ❌ ❌ ✅ Keypads and readers, not locks: codes are checked, nothing is written to the device

Code Events means Lock Code Manager can tell which user's code was used and emits an event for it: the lock_code_manager_credential_used bus event and the user's event entity, either of which can trigger automations.

¹ Custom integration required (Local Akuvox, hass-virtual)

Each integration's wiki page covers its setup and limitations. Adding support for a new lock integration is straightforward — see the Adding a Provider guide. Contributors welcome!

Some lock integrations can't currently be supported, and some integrations' entities don't work as condition entities.

Installation

The best way to install this integration is via HACS.

  1. Set up your locks in Home Assistant through a supported integration (Z-Wave, ZHA, Matter, Schlage, Zigbee2MQTT/MQTT, etc.)
  2. Add this repository as a custom integration repository in HACS
  3. Go to Settings > Devices & Services > Add Integration
  4. Select Lock Code Manager
  5. Follow the prompts - additional information about the configuration options are available in the Wiki

Upgrading across a major version? Read its upgrade guide in the wiki first — major-version migrations are one-way.

UI & Dashboards

Lock Code Manager ships custom Lovelace strategies (which auto-generate UI from your config) and custom cards (which you compose yourself). Pick the one that matches how much control you want — from a one-click dashboard that just works (selectable directly from Settings → Dashboards → Add Dashboard on Home Assistant 2026.5+) to a hand-authored layout that places exactly what you want where you want it.

Learn More

Visit the Wiki for detailed documentation including configuration, troubleshooting, dashboard setup, and development guides.

AI Usage

While I began this project before AI coding agents and wrote the bones myself, since November 2025 it's been hard NOT to code with a coding agent. You will notice that almost all of my PRs since then have been co-authored with Claude (I've also experimented with Codex and Copilot).

If you look at any of the PRs, particularly the meaningful ones, you'll notice many commits. Some come from AI code reviews, but many come from my own code reviews or from me steering the design. I can't say I've audited everything line for line, but I can comfortably say that it's not exfiltrating your data or doing anything evil.

If you are uncomfortable using this integration because of concerns around AI, I completely understand and that is your prerogative. If you ever want to chat about it — whether it's to convince me that what I'm doing is wrong, to learn more about it, or anything in between — find me on the Home Assistant Discord.

About

Lock code manager for locks integrated with Home Assistant

Topics

Resources

Stars

112 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages