keymaster_lock_state_changed is an event that @brenthaag is using. I use it myself for automation triggering and that event has not changed with the v0.1.x release series.
After countless hours of troubleshooting why my HA app notifications suddenly stopped working, I finally found a fix that worked for me, so I figured Iâd share in case it helps someone else.
Before doing anything, I saved all of my codes from the Lovelace dashboard.
Then I removed my lock from Keymaster and, through HACS, uninstalled the Keymaster integration. I rebooted HA after each removal step.
After that, I reinstalled Keymaster and used the same Keymaster name as before.
Next, I deleted my entire Lovelace dashboard and added a new one from:
/homeassistant/custom_components/keymaster/lovelace/frontdoorlock.yaml
I pasted that into the bottom of the Raw Configuration Editor.
The only difference I noticed afterward is that the slot number now appears in the notification (in my case [23]). Not a problem, just an observation.
This fix worked for me on Keymaster v0.1.0.
Hope this helps anyone else running into the same issue!
Youâre close, but looking at the âstatesâ page. You need to check the âeventsâ tab. (1)
On the events tab, paste the event name that @brenthaag mentioned keymaster_lock_state_changed (2), hit âstart listeningâ (3) and then trigger an event by opening a deadbolt or keying in a pin.
You should see the events showing up immediately below. (4)
Thank-you so much.
That worked a treat. I assume thats in a Wiki somewhere, apologies if I missed it but really appreciate your following up.
Anytime. ![]()
I had a few hours of power outage and most things recovered without a problem, including HA except Keymaster. Keymaster was working fine for years. Current version is v0.1.0.
All the Automations are gone, and am mostly getting errors âEntity not foundâ on the default Lovelace page.
I read up this thread and I do not know how to fix this.
If I go to Settingsâ>Integrationâ>keymasterâ>Integration entries, under the lock all the details and options are still there.
What is my path forward? I saw someone uninstall and reinstall. Is that the only safe bet?
All of the input_foo type entities that you list on that page are from Keymaster before v0.1.x. The current dashboard files are generated in custom_components/keymaster/lovelace/<lock>.yaml and need to be added to a new dashboard.
thank you. Hairless monkey that fell out of tree here.
So, what is the best approach for me? Get info out what is in there, uninstall, reinstall? or, click something, pull something, and bam, all good?
Well, if you update the dashboard with the newly generated one you should be good as long as there arenât any actual problems with Keymaster
I figured it out. thanks!
I canât seem to make my automation work since I donât know where to fetch the info I need. I am trying to find the following:
User who unlocked the door based on pin used
Was it a manual unlock or a keypad unlock
My code so far:
- alias: Front Door â Save User and Notify
trigger:
- platform: state
entity_id: lock.front_door
to: "unlocked"
action:
- variables:
last_user: "{{ state_attr('lock.front_door', 'icon') | default('unknown') }}"
- service: camera.snapshot
target:
entity_id: camera.doorbell
data:
filename: /config/www/Camera/doorbell.jpg
- service: input_text.set_value
target:
entity_id: input_text.front_door_last_user
data:
value: "{{ last_user }}"
- delay: "00:00:01"
- service: notify.notify
data:
title: "Front Door Unlocked"
message: "{{ last_user }} unlocked the front door"
data:
image: /local/Camera/doorbell.jpg
actions:
- action: "URI"
title: "View Live Feed"
uri: "/dashboard-cameras/driveway"
Door lock: Schlage BE469NXCEN619
There are numerous instances of how to do something like this throughout this thread (yes, I know itâs a huge thread).
The most recent example that I posted is at KeyMaster Z-Wave lock manager and scheduler - #3058 by tykeal
You shouldnât be using the lock state itself as the trigger as itâs not going to provide any of the data youâre after, but a platform event trigger with event_type keymaster_lock_state_changed will, as that is going to have the data you are wanting in it.
So had to fix the code a little and added snapshot and a link to live feed:
automation:
- alias: Front Door Lock
description: Keymaster Front Door Notification
trigger:
- platform: event
event_type: keymaster_lock_state_changed
event_data:
state: unlocked
variables:
sn: >-
{% set name = trigger.event.data.code_slot_name | default('') %}
{{ 'Manual' if name in ['', none] else name }}
verb: >-
{{ 'unlock of' if sn == 'Manual' else 'unlocked' }}
door: "Front Door"
action:
- service: camera.snapshot
target:
entity_id: camera.doorbell
data:
filename: /config/www/snapshot/person.jpg
- service: logbook.log
data:
name: "front_door"
entity_id: "{{ trigger.event.data.entity_id }}"
message: "{{ sn }} {{ verb }} the {{ door }}"
- delay: "00:00:01"
- service: notify.notify
data:
title: "{{ door }}"
message: "{{ sn }} {{ verb }} the {{ door }}"
data:
tag: "front_door"
image: /local/snapshot/person.jpg
actions:
- action: URI
title: View Live Feed
uri: "/dashboard-cameras/driveway"
Is there somewhere that describes what each feature does in this? IE: Where can I set my night time and daytime for the auto-lock? What does enabling notifications do exactly? Does it notify every device? etc.
New user here, is there a way to configure the Auto Lock feature? I have set the sensor for each lock but do not see a way to adjust the timing of the auto lock.
Youâre going to have to go to the device itself and configure the timers there the first time. After that youâll be able to adjust them from the dashboard.
I see it now, thank you!!!
I finally upgraded to Keymaster 0.1.x. I love the new functionality and not having to manage entities through the packages manually.
One thing Iâm noticing, there doesnât appear to be a way to set the timeout for auto lock to be in increments less than a minute. I had several doors that were set at 30 seconds and one that was set at 90 seconds. Am I missing something or are whole number increments the only option now?
You are correct that whole number of minutes is how itâs now designed.
Iâve upgraded to the latest keymaster version and am trying to get the custom dashboard working. If I create a new dashboard, then it works great, but if I want tabs within a current dashboard, Iâm unable to get the tabâs to be named anything other than âunnamed viewâ
This is the code Iâm using in the raw config editor for the dashboard. Iâve also tried without a âtitleâ tag
- strategy:
type: custom:keymaster
lock_name: Front Lock
title: Front Lock
icon: mdi:door-closed-lock
- strategy:
type: custom:keymaster
lock_name: Garage Lock
title: Garage Lock
- strategy:
type: custom:keymaster
lock_name: Side Lock
title: Side Lock
Also, If I manually name it with the pencil icon, that negates the whole dashboard as expected.





