Repository navigation
Migrating from keymaster
A practical guide for switching from keymaster to Lock Code Manager. The two integrations cover the same problem space — keymaster's per-slot features all have an LCM equivalent — but the modelling differs in a few places, so this page walks through the swap step by step.
The biggest difference is what you configure. Keymaster gives you a fixed block of numbered slots and you fill them in. Lock Code Manager asks you to name a person, and picks the slot number itself by reading what the lock holds. Slot numbers still exist — locks are built around them — but you do not choose or maintain them.
Migrate one lock at a time. Keymaster and LCM both write codes to the lock's slots, so if both have a config entry pointing at the same lock they'll fight each other. The steps below have you remove the keymaster entry for a lock before adding an LCM entry for it. You can keep keymaster installed for any other locks you haven't migrated yet — only the per-lock entries need to swap.
Keymaster leaves PINs on the lock — clear them before adding LCM users. When you remove a slot from keymaster (or remove the keymaster entry for a lock), keymaster stops managing the slot but does not clear the PIN from the physical lock. LCM never touches a code it didn't create: it places users only in free slots and leaves keymaster's codes where they are, still working. So:
- If you want to keep the same PINs, clear keymaster's codes from the lock first, then add each person in LCM with their PIN. LCM writes its own copy in a free slot. Leaving keymaster's copy in place doesn't work: on a lock that can read its codes, LCM refuses a PIN that is already in another slot, and turns that user off with a Slot disabled repair.
- If you start fresh with new PINs, still clear the old codes, or they keep opening the door.
Either way, clear them with your lock integration's clear-code service (e.g.
zwave_js.clear_lock_usercode), the lock's keypad, or the
lock codes card,
which shows codes LCM doesn't manage and lets you clear them. You don't pick
slot numbers in LCM, and you don't need to.
One thing LCM does that keymaster does not: removing a user clears their PIN from the lock. Keymaster leaves it programmed, which is how locks accumulate codes nobody can account for.
| Keymaster | Lock Code Manager |
|---|---|
Slot name
|
The user's name — the thing you configure, and what every entity is named after |
Slot pin
|
The user's pin field |
Slot enabled toggle |
Per-user switch.*_enabled entity |
Slot notifications flag |
Slot Usage Notifier blueprint |
accesslimit_count (uses-remaining) |
Slot Usage Limiter blueprint |
accesslimit_date_range_start / _end
|
Date Range Condition blueprint, attached as a condition entity |
accesslimit_day_of_week (per-day + time window) |
A schedule helper attached as a condition entity (Using Condition Entities) |
starting_code_slot + number_of_code_slots
|
Nothing to configure — LCM allocates slot numbers by reading the lock, and each provider declares where its numbers stop |
autolock_enabled + day/night minimums |
Auto Re-lock blueprint |
| Parent / child lock relationships (one primary, others bolted on) | One LCM entry listing multiple lock.* entities as peers — no primary/secondary hierarchy |
| Auto-generated keymaster Lovelace dashboard | LCM ships its own dashboard / view / section strategies — see UI Strategies |
| Akuvox, Schlage, Z-Wave providers | Same — plus Matter, ZHA, Zigbee2MQTT, Z-Wave JS UI (MQTT), and Virtual |
Do this once per lock (or once per parent/child group, since those become one LCM entry). You can leave keymaster in place for any locks you haven't reached yet.
For each enabled slot, note:
- Slot number
- Name
- PIN
- Any access restrictions: date range, day-of-week + time window, use-count limit
- Whether
notificationswas on
A screenshot of the keymaster dashboard for the lock is usually enough. If the lock is part of a parent/child group, capture all of them — they share slot definitions and become a single LCM entry.
Settings → Devices & Services → Keymaster → ⋯ → Delete for the lock you're migrating. (For a parent/child group, delete each entry.)
This is what frees the lock so LCM can take over. Keymaster won't clear the codes on the lock — they stay set — but it stops writing to the lock, which is the only way to avoid a tug-of-war once LCM starts syncing.
Use your lock integration's clear-code service (e.g.
zwave_js.clear_lock_usercode for Z-Wave) or the lock's keypad to wipe the
codes keymaster set. LCM won't clear or reuse them for you (see
Before you start), and a person
whose PIN is still in a keymaster slot can't be given the same PIN in LCM.
If you add this lock to an LCM entry that already has users, and the lock still holds codes in the slots those users hold, LCM refuses to add the lock until those slots are cleared.
Follow the install section in the README — HACS, restart, then Settings → Devices & Services → Add Integration → Lock Code Manager. Skip this step on subsequent locks.
In Add Integration → Lock Code Manager:
- Give the entry a name and pick the lock entity (or entities — LCM accepts multiple).
- Choose UI to enter users one at a time, or YAML to paste them all as one block (see Configuration Structure). You do not pick slot numbers: LCM reads the lock and allocates free ones, so they need not match keymaster's.
If keymaster used parent/child locks to broadcast one PIN to several locks, configure those locks in a single LCM entry instead of separate entries — LCM will sync each slot across all listed locks automatically. There's no primary/secondary distinction in LCM: every lock in the entry is treated as a peer and sees the same slot definitions, so the order you list them doesn't matter.
Give each person you're bringing over a name and pin, with
enabled on. That handles the always-on codes. Anyone you did not add
during setup can be added later from the entry's page with Add user
— one at a time, or several as a block — or with the
add_user
action.
For each slot that had keymaster restrictions, set up the matching LCM construct:
-
Day-of-week + time window (e.g. weekdays 9 AM – 5 PM): create a
schedulehelper with the window, then attachschedule.<name>as the person's condition entity. See Using Condition Entities. -
Date range (e.g. guest staying Mar 12 – Mar 18): import the
Date Range Condition blueprint, configure it,
and attach the resulting
binary_sensoras the person's condition entity. -
Calendar-driven access (e.g. an Airbnb iCal feed): use a
calendarentity directly as the condition entity, or use the Calendar Condition blueprint for richer filtering. - Use-count limit (e.g. PIN valid for 3 entries): import the Slot Usage Limiter blueprint. It turns off the person's enabled switch after the configured number of uses.
- Per-person notifications: import the Slot Usage Notifier blueprint and target it at the person's credential used event entity.
For attaching condition entities through the UI rather than YAML, see the Condition Linker blueprint.
Keymaster's per-lock autolock with day/night minimums maps to the Auto Re-lock blueprint — one automation per lock, with optional separate delays for daytime vs. nighttime.
Keymaster auto-generated a Lovelace dashboard per lock. LCM doesn't generate one automatically, but ships strategies that do the same job in a more composable way. See UI Strategies for the options (one-click dashboard, view strategy, or section strategy), and Custom Cards if you want to compose your own layout from LCM's building blocks.
For each slot:
- Toggle
enabledoff and on — confirm the PIN is removed and re-set on the lock (watch the slot card or the lock integration's logs). - For slots with condition entities, force the condition off (e.g.
end-time a
schedule, expire a date range) and confirm the slot reports inactive and the PIN is cleared from the lock.
Repeat steps 1–3 and 5–10 for the next lock. Once every keymaster entry is gone you can uninstall keymaster from HACS, but there's no rush — it's harmless once it has no entries.
| Provider | Keymaster | LCM |
|---|---|---|
Z-Wave (zwave_js) |
✅ | ✅ — Z-Wave integration |
Schlage (schlage) |
✅ | ✅ — Schlage integration |
Akuvox (local_akuvox) |
✅ | ✅ — Akuvox integration |
| Matter | ❌ | ✅ — Matter integration |
| ZHA | ❌ | ✅ — ZHA integration |
| Zigbee2MQTT (MQTT) | ❌ | ✅ — Zigbee2MQTT integration |
| Z-Wave JS UI (MQTT) | ❌ | ✅ — Z-Wave JS UI (MQTT) |
| Virtual (testing) | ❌ | ✅ — Virtual integration |
If you're on a provider keymaster supports, the move is transparent at the
lock level — the same lock.* entity that keymaster was talking to is
what LCM will use.
- The auto-generated Lovelace dashboard — rebuild via UI Strategies (often a one-line YAML strategy reference covers the whole dashboard).
- Keymaster's autolock entity model — replaced by the Auto Re-lock automation blueprint. Behaviour is equivalent for the common day/night case; nuanced setups may need a custom automation.
-
Keymaster's
*.connected/*.code_slotsentity naming — LCM exposes per-slot entities under its own naming scheme. Update any automations that referenced keymaster entity IDs.
Getting Started
- Upgrading to 7.0
- Upgrading to 6.0
- Upgrading to 5.0
- Configuration Structure
- Adding and Removing Locks
- Migrating from keymaster
UI
Features
- Managing Guests and Rentals
- Services and Actions
- Blueprints
- Tracking lock state change events
- Using Condition Entities
- Unsupported Condition Entities
Advanced
Development
Troubleshooting
FAQ
Supported Integrations