Skip to content

Adding and Removing Locks

raman325 edited this page Jul 16, 2026 · 1 revision

Adding and Removing Locks

Each Lock Code Manager config entry manages a set of locks and a set of slots. The slot configuration applies to every lock in the entry, so adding or removing a lock changes which locks the entry's slots are synced to — it does not change the slot configuration itself.

All of the flows below start from Settings → Devices & Services → Lock Code Manager, then selecting the config entry.

Adding a lock

  1. Click Configure on the config entry.
  2. Add the lock to the Locks selector.
  3. Submit.

If the new lock already has codes programmed in slots that LCM will manage, a confirmation step lists them before anything is overwritten. Review it carefully — once confirmed, LCM will sync its configured slot values onto the lock.

Removing a lock

  1. Click Configure on the config entry.
  2. Remove the lock from the Locks selector.
  3. Submit.

LCM removes the entities it created for that lock and unlinks the lock's device from the config entry. The slot configuration is untouched and continues to apply to the remaining locks.

⚠️ PINs are not cleared from the lock. Removing a lock only stops LCM from managing it — any codes LCM programmed remain active on the physical lock. If you want them gone, disable the relevant slots (or clear the PINs) first, wait for the lock to sync, and then remove the lock from the entry.

Recovering when a lock entity was deleted outside LCM

If a configured lock entity no longer exists — for example the device was removed from Home Assistant, or a Z-Wave lock was excluded and re-included under a new entity ID — the config entry fails to load with:

Unable to start because lock lock.example can't be found

This is expected: LCM refuses to start with a lock list it can't resolve, and instead starts a repair flow so you can fix the list.

  1. Go to Settings → Devices & Services → Lock Code Manager (the entry shows a reconfigure notice; it also appears under Settings → System → Repairs).
  2. Open the flow. The dialog shows the entry's current lock list.
  3. Remove the missing lock — or replace it with its new entity ID, if the lock was re-added under a different name.
  4. Submit. The entry reloads automatically.

Note: LCM 4.3.0 and earlier have a bug where opening this dialog fails with an error (#1348). Upgrade to a newer release; if you cannot upgrade, use the last-resort procedure below.

Last resort: manually editing the config entry

Only do this if the repair flow above is unavailable (e.g. you are stuck on an affected version). Editing Home Assistant's storage by hand is unsupported by Home Assistant and a typo can corrupt all of your config entries.

  1. Stop Home Assistant.
  2. Back up /config/.storage/core.config_entries.
  3. Open the file and find the Lock Code Manager entry (search for "domain": "lock_code_manager").
  4. Remove the missing entity ID from the locks list — check both the entry's data and options objects, as the lock list may appear in either.
  5. Save and start Home Assistant.

Clone this wiki locally