-
-
Notifications
You must be signed in to change notification settings - Fork 18
Custom Cards
Lock Code Manager registers three custom Lovelace cards. They're the building blocks the UI Strategies generate, but you can also place them yourself anywhere in a hand-built dashboard.
- User card — one user, with inline editing.
- Add user card — a button that adds one.
- Lock codes card — every slot on one lock, with status badges.
The user card and the lock codes card have visual editors in the dashboard UI, so you can configure them by clicking Edit dashboard → Add card → Custom: LCM User Card / Lock Codes Card without writing YAML. The tables below document every option for users editing in YAML or building strategies.
Displays a single Lock Code Manager user with inline editing of name/PIN/enabled state, real-time updates over WebSocket, and collapsible Conditions and Lock status sections.
Renamed in 5.0. This card was
custom:lcm-slot, and that name still works — it is the same card, and it logs a deprecation warning. It will be removed in a future release, so changetype: custom:lcm-slottotype: custom:lcm-userin any dashboard you wrote by hand. Generated dashboards update themselves.The card no longer shows a slot number anywhere. See Upgrading to 5.0.
- Inline editing of the slot name, PIN, and enabled toggle (no need to dive into the integration's options page).
- Real-time updates: name, PIN, and condition entity changes pushed live over a WebSocket subscription.
- Status badges at the card header: active, inactive, disabled, pending sync, suspended.
- Conditions section showing the configured condition entity (calendar, schedule, binary_sensor, etc.) with a Wire condition entity dialog for adding one inline.
- Optional condition helper entities (toggles, schedules, etc.) surfaced under the condition entity for quick access from the dashboard.
- Lock status section showing per-lock sync state and (optionally) the actual code currently on each lock.
- Lock-count badge showing how many locks the user is configured on.
- Remove user, with a confirmation naming them. The confirmation exposes whether to clear their code from the locks, because the two answers are different intents: revoke the credential, or hand it over and stop managing it. It defaults to clearing.
Either config_entry_id or config_entry_title is required — not both. Identify the user with user_entity_id, name, or (deprecated) slot.
| Option | Type | Default | Description |
|---|---|---|---|
config_entry_id |
string | — | LCM config entry ID. Use this for stability across renames. |
config_entry_title |
string | — | LCM config entry title. Convenient for hand-edited YAML. |
user_entity_id |
string | — | An entity belonging to the user to display. The steadiest way to address one: it survives renames, which a name does not. This is what generated dashboards use. |
name |
string | — | The user to display, matched ignoring case and punctuation. Convenient to write by hand. |
slot |
int | — |
Deprecated. The slot number the user holds. Still accepted so existing dashboards keep working; prefer user_entity_id or name. |
code_display |
masked | unmasked | masked_with_reveal
|
masked_with_reveal |
How code values render in the Lock status section. See Code display modes. |
show_conditions |
bool | true |
Show the Conditions section. |
show_lock_status |
bool | true |
Show the Lock status section. |
show_code_sensors |
bool | true |
Deprecated. No longer rendered by the slot card; the hero PIN at the top of the card already displays the synced code with a show/hide toggle. Still accepted for backward compatibility so existing dashboards continue to validate. |
show_lock_sync |
bool | true |
Show per-lock sync state inside Lock status. |
show_lock_count |
bool | true |
Show the lock-count badge in the card header. |
collapsed_sections |
array of condition | conditions | lock_status
|
[] |
Sections that start collapsed. (Both condition and conditions are accepted.) |
condition_helpers |
array of entity IDs | none | Extra helper entities (input_booleans, schedules, switches, etc.) surfaced underneath the condition entity for quick toggling from the dashboard. |
type: custom:lcm-user
config_entry_id: 01HZK9X4GR3PQ8YFAB6V0CZ7TM
name: Raman
code_display: masked_with_reveal
collapsed_sections:
- lock_status
condition_helpers:
- input_boolean.guest_arrived
- schedule.guest_quiet_hoursNew in 5.0. A button that opens a dialog for adding a user to a config entry, so an entry can be managed entirely from the dashboard. Generated dashboards place one between the users and the locks.
- Name, and an optional PIN with a show/hide toggle.
-
Generate PIN, with a length between 4 and 12 digits. This calls
generate_pinrather than inventing one locally, so the same safety filtering applies, and it reveals the result — a code you cannot read is one you cannot pass on. - An optional condition entity, if Home Assistant has made its entity picker available to the dashboard. When it has not, the field is left out rather than replaced by a free-text entity ID, and you can set the condition from the user card afterwards.
- An enabled toggle.
Submitting calls add_user and reloads the page, because the view is strategy-generated and the new user has no card until the strategy runs again.
The card decides nothing beyond those fields — the integration picks the slot number. Capacity and allocation rules live in one place, and a second copy in the frontend would drift.
Either config_entry_id or config_entry_title is required — not both.
| Option | Type | Default | Description |
|---|---|---|---|
config_entry_id |
string | — | LCM config entry ID. Use this for stability across renames. |
config_entry_title |
string | — | LCM config entry title. Convenient for hand-edited YAML. |
type: custom:lcm-add-user
config_entry_id: 01HZK9X4GR3PQ8YFAB6V0CZ7TMDisplays all code slots for a specific lock — both LCM-managed and unmanaged — with status badges and inline editing for the unmanaged ones.
- Shows every slot on the lock with its current code (subject to Code display modes).
- Status chips per slot: Active, Inactive, Disabled, Empty, Pending sync.
- Sync-status indicators with distinct visual treatment for in-sync, out-of-sync, syncing, and suspended states.
- LCM-managed slots are clickable: clicking navigates to the slot's config entry view.
- Unmanaged slots are inline-editable: click the code value to set or clear it (uses
set_usercode/clear_usercodefrom Services and Actions). - Reveal/hide button for masked codes when
code_display: masked_with_reveal.
| Option | Type | Default | Description |
|---|---|---|---|
lock_entity_id |
lock entity | — (required) | The lock to display codes for. |
title |
string | lock's friendly name | Custom title for the card. |
code_display |
masked | unmasked | masked_with_reveal
|
masked_with_reveal |
How code values render. See Code display modes. |
type: custom:lcm-lock-codes
lock_entity_id: lock.front_door
title: Front Door Codes
code_display: masked_with_revealBoth cards (and every strategy that wraps them) accept the same code_display values:
| Mode | Description |
|---|---|
masked |
Codes are always hidden as bullets. Length is preserved when known. |
unmasked |
Codes are always visible in plain text. |
masked_with_reveal |
(default) Codes are masked but can be revealed individually with a per-card toggle button. |
Privacy reminder:
maskedonly hides codes in this card's UI — it doesn't redact PIN values from logs, the underlyingtext.*PIN entities, the device activity log, or the recorder database. See PIN Codes Visible in Activity Log for the broader picture.
Getting Started
UI
- Add a UI for lock code management — overview & decision guide
- UI Strategies
- Custom Cards
Features
- Managing Guests and Rentals
- Services and Actions
- Blueprints
- Tracking lock state change events
- Using Condition Entities
- Unsupported Condition Entities
- Notifications
Advanced
Development
Troubleshooting
FAQ
Supported Integrations