-
Notifications
You must be signed in to change notification settings - Fork 53
Lovelace Configuration Automatic
Keymaster provides Lovelace strategies that automatically generate dashboards and views for managing your locks. This eliminates the need to manually copy and paste YAML configuration.
The Keymaster frontend must be loaded. This happens automatically when you have at least one Keymaster integration configured.
If your Home Assistant Lovelace resources are managed in YAML mode, add this manually:
lovelace:
resources:
- url: /keymaster_files/keymaster.js
type: moduleThe easiest way to use Keymaster is to create a dedicated dashboard that automatically shows all your configured locks.
- Go to Settings → Dashboards
- Click Add Dashboard
- Enter a title (e.g., "Keymaster")
- Toggle "Open in a new tab" as desired
- Click Create
- Click Open on the new dashboard
- Click the three dots menu → Edit Dashboard
- Click the three dots menu → Raw configuration editor
- Replace all content with:
strategy:
type: custom:keymaster- Click Save, then Done
The dashboard will automatically create a view (tab) for each configured lock, sorted alphabetically.
If you prefer to add Keymaster views to an existing dashboard, use the view strategy.
Edit your dashboard's raw configuration and add a view:
views:
# Your existing views...
- strategy:
type: custom:keymaster
lock_name: Front Door| Option | Required | Description |
|---|---|---|
lock_name |
Yes* | The name of the lock as configured in Keymaster |
config_entry_id |
Yes* | The config entry ID (alternative to lock_name) |
title |
No | Override the view tab title |
icon |
No | Set a custom icon for the view tab |
path |
No | Custom URL path for the view |
visible |
No | Control view visibility |
theme |
No | Apply a specific theme to the view |
*Provide either lock_name or config_entry_id, not both.
views:
- strategy:
type: custom:keymaster
lock_name: Front Door
title: Front Lock
icon: mdi:door-closed-lockFor advanced use cases, you can use the section strategy to add individual code slot sections:
views:
- type: sections
title: My Custom View
sections:
- strategy:
type: custom:keymaster
lock_name: Front Door
slot_num: 1
- strategy:
type: custom:keymaster
lock_name: Front Door
slot_num: 2This message appears when there is a typo in the strategy type.
Ensure that you copied and pasted the full, correct strategy name into the YAML configuration.
Note: A previous version of this page had a typo in the strategy type. Copy and paste the corrected version into your YAML configuration.
This message appears when:
- No Keymaster integrations are configured
- All Keymaster integrations are disabled
Ensure you have at least one enabled Keymaster integration in Settings → Devices & Services.
- Verify the lock integration is enabled (not disabled)
- Check that the lock name matches exactly (case-sensitive when using
lock_name) - Refresh the browser page after making configuration changes
Lovelace strategies are generated dynamically. If you add or remove locks:
- Refresh your browser
- If using a dashboard strategy, views will automatically update
If you rely on the generated per-lock YAML files, you can run keymaster.regenerate_lovelace from Developer Tools → Actions.