Skip to content
raman325 edited this page May 2, 2026 · 1 revision

Custom Cards

Lock Code Manager registers two 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.

Both cards have visual editors in the dashboard UI, so you can configure them by clicking Edit dashboard → Add card → Custom: Lock Code Manager Slot Card / Lock Codes Card without writing YAML. The tables below document every option for users editing in YAML or building strategies.


Slot card (custom:lcm-slot)

Displays a single LCM-managed code slot with inline editing of name/PIN/enabled state, real-time updates over WebSocket, and collapsible Conditions and Lock status sections.

Features

  • 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 in the header showing how many locks the slot is configured on.

Configuration

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.
slot int (required) Slot number to display.
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 Show the on-lock code sensor inside Lock status.
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.

Example

type: custom:lcm-slot
config_entry_id: 01HZK9X4GR3PQ8YFAB6V0CZ7TM
slot: 1
code_display: masked_with_reveal
collapsed_sections:
  - lock_status
condition_helpers:
  - input_boolean.guest_arrived
  - schedule.guest_quiet_hours

Lock codes card (custom:lcm-lock-codes)

Displays all code slots for a specific lock — both LCM-managed and unmanaged — with status badges and inline editing for the unmanaged ones.

Features

  • 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_usercode from Services and Actions).
  • Reveal/hide button for masked codes when code_display: masked_with_reveal.

Configuration

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.

Example

type: custom:lcm-lock-codes
lock_entity_id: lock.front_door
title: Front Door Codes
code_display: masked_with_reveal

Code display modes

Both 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: masked only hides codes in this card's UI — it doesn't redact PIN values from logs, the underlying text.* PIN entities, the device activity log, or the recorder database. See PIN Codes Visible in Activity Log for the broader picture.

Clone this wiki locally