I’ve posted several times in theKeymaster Z-Wave Lock Manager thread helping folks with custom notification systems.
For my properties I use something similar to this for handling my static codes and my Guest Entry Notifier blueprint that I wrote for notification when a guest checks in at the property.
For my various properties using Keymaster and Rental Control:
alias: Lock Logging and notification
description: ""
triggers:
- event_type: keymaster_lock_state_changed
event_data:
state: unlocked
variables:
sn: |-
{%- if trigger.event.data.code_slot_name == "" -%}
Manual
{%- else -%}
{{ trigger.event.data.code_slot_name }}
{%- endif -%}
verb: |-
{%- if trigger.event.data.code_slot_name == "" -%}
unlock of
{%- else -%}
unlocked
{%- endif -%}
slot_num: "{{ trigger.event.data.code_slot_num }}"
trigger: event
conditions: []
actions:
- data:
name: "{{ trigger.event.data.lockname }}"
entity_id: "{{ trigger.event.data.entity_id }}"
message: "{{ sn }} {{ verb }} the {{ trigger.event.data.lockname }}"
action: logbook.log
- choose:
- conditions:
- condition: and
conditions:
- condition: template
value_template: "{{ slot_num > 0 }}"
- condition: or
conditions:
- condition: template
value_template: "{{ slot_num < 6 }}"
- condition: template
value_template: "{{ slot_num > 10 }}"
sequence:
- choose:
- conditions:
- condition: template
value_template: "{{ sn == 'Cleaner' }}"
sequence:
- data:
message: Cleaner door code entered
title: Cleaner entry
action: notify.zulip_admin
mode: single
For my home itself, I just do logging with:
alias: Lock Logging
description: ""
mode: single
triggers:
- event_type: keymaster_lock_state_changed
event_data:
state: unlocked
variables:
sn: |-
{%- if trigger.event.data.code_slot_name == "" -%}
Manual
{%- else -%}
{{ trigger.event.data.code_slot_name }}
{%- endif -%}
verb: |-
{%- if trigger.event.data.code_slot_name == "" -%}
unlock of
{%- else -%}
unlocked
{%- endif -%}
trigger: event
conditions: []
actions:
- data:
name: "{{ trigger.event.data.lockname }}"
entity_id: "{{ trigger.event.data.entity_id }}"
message: "{{ sn }} {{ verb }} the {{ trigger.event.data.lockname }}"
action: logbook.log