Skip to content

Add a UI for lock code management

Chris Helming edited this page Mar 5, 2024 · 4 revisions

Lock Code Manager makes it easy for you to generate a UI for managing and monitoring your PINs.

While not necessary, the UI is a little cleaner if you have the fold-entity-row card installed.

Dashboard

To have a dedicated dashboard in the left side panel that has all of your Lock Code Manager config entries:

  1. Create a new Dashboard from scratch
  2. Give your Dashboard a name and an icon
  3. The YAML config for your new dashboard is as follows:
strategy:
    type: custom:lock-code-manager
    include_code_slot_sensors: true // If set to true, the code slot sensors will be displayed in the UI, otherwise they will be hidden. This setting is optional and defaults to false

The Dashboard will now expose all of your lock configurations across multiple views.

View

To create a view for a specific Lock Code Manager config entry, your view definition should be as follows:

strategy:
    type: custom:lock-code-manager
    config_entry_title: <Title of your config entry> // Use this or config_entry_id to display the right UI but not both!
    config_entry_id: <ID of your config entry> // Use this or config_entry_title to display the right UI but not both!
    include_code_slot_sensors: true // If set to true, the code slot sensors will be displayed in the UI, otherwise they will be hidden. This setting is optional and defaults to false

Example minimal dashboard configuration using the view configuration:

views:
    - strategy:
          type: custom:lock-code-manager
          config_entry_title: House Locks
          include_code_slot_sensors: false
      icon: mdi:lock-smart
      title: Lock Code Manager

Example

dashboard