Skip to content

Add a UI for lock code management

raman325 edited this page May 4, 2026 · 11 revisions

Add a UI for lock code management

Lock Code Manager ships custom dashboard strategies (which generate Lovelace UI for you) and custom cards (which you compose yourself into a dashboard). Most people pick one or the other based on how much control they want.

Which approach should I pick?

You want… Use… Scope Documented in
A whole dashboard auto-built from every LCM config entry — paste 2 lines, done Dashboard strategy Entire integration (all config entries) UI Strategies → Dashboard strategy
To add a single LCM view to a dashboard you already maintain View strategy One config entry UI Strategies → View strategy
To drop one slot or one lock into a sections-type view alongside non-LCM cards Section strategies One slot or one lock UI Strategies → Section strategies
To fully hand-author a dashboard, picking exactly which cards live where Custom cards Per card Custom Cards
The pre-2.0 entities-card UI Legacy mode Any of the above UI Strategies → Legacy mode

Strategies and custom cards aren't mutually exclusive — a strategy ultimately just emits the same custom cards documented under Custom Cards. You can mix-and-match.

Quick start: dashboard strategy

This generates a dashboard with one view per LCM config entry, plus a "User Codes" view that shows every code on every managed lock.

Home Assistant 2026.5 and newer

  1. Go to Settings → Dashboards → Add Dashboard.
  2. Pick Lock Code Manager from the strategy list.
  3. Choose a name (e.g. Lock Codes) and an icon, and save.

That's it — every config entry is auto-discovered.

Home Assistant 2026.4 and older (or to customize options)

The strategy picker only ships with HA 2026.5+, and even on newer HA the picker creates a dashboard with default options. If you need to set strategy options (collapsed sections, code-display mode, which sub-views to render, condition helper entities, etc.) you'll want the YAML path:

  1. Go to Settings → Dashboards → Add Dashboard.

  2. Choose a name (e.g. Lock Codes) and an icon.

  3. Open the dashboard and click the pencil icon to edit.

  4. Click the three-dot menu → Raw configuration editor.

  5. Replace the contents with:

    strategy:
      type: custom:lock-code-manager

For the full options list, see UI Strategies → Dashboard strategy options.

Example

dashboard

Clone this wiki locally