ISO help... Zwave Door Lock Notification YAML

Hoping someone can share Zwave Door Lock notification YAML? I’d like to have the notification include this info…

  1. Manual, Keypad, RF
  2. code slot # (not the actual code itself)
  3. locked / unlocked

so far I have only been able to figure out how to get the locked/unlocked info

This YAML doesnt provide the info on if the keypad was used, or if the lock/unlock was automated vs manual.

alias: "Notify : Door Lock Change"
description: Notification sent to all devices when a Door Lock changes status.
triggers:
  - entity_id:
      - lock.mudroom_deadbolt
      - lock.front_entry_deadbolt
    trigger: state
actions:
  - data:
      title: |
        {% if trigger %}
          {{ trigger.to_state.name }} is {{ trigger.to_state.state }}
        {% else %}
          Unknown Door - Status Changed
        {% endif %}
      message: |
        {% if trigger %}
          {% set lock_status = trigger.to_state.attributes.lock_status %}
          {% set lock_status = lock_status|replace("by RF", "by automation") %}
          {% set lock_status = lock_status|replace("user 0", "code 0") %}
          {% set lock_status = lock_status|replace("user 1", "1") %}
          {% set lock_status = lock_status|replace("user 2", "2") %}
          {% set lock_status = lock_status|replace("user 3", "3") %}
          {% set lock_status = lock_status|replace("user 4", "4") %}
          {% set lock_status = lock_status|replace("user 5", "5") %}          
          {% set lock_status = lock_status|replace("user 6", "6") %}
          {% set lock_status = lock_status|replace("user 7", "7") %}          
          {% set lock_status = lock_status|replace("user 8", "8") %}
          {{ lock_status }}
        {% else %}
          Missing trigger information
        {% endif %}
    action: notify.notify
mode: parallel
max: 10

What is the model of the lock you are using?

They are from Schlage

I’ve used this automation on Yale and Kwikset z-wave locks, so I’m not sure this will help for your Schlage. This automation will update the applicable input text “helper” .



- id: '0'
  alias: Door Locks
  triggers:
  - event_type: zwave_js_notification
    event_data:
      node_id: 3
      type: 6
    trigger: event
  - event_type: zwave_js_notification
    event_data:
      node_id: 4
      type: 6
    trigger: event
  actions:
  - sequence:
    - if:
      - condition: template
        value_template: '{{ trigger.event.data.event | int != 6 }}'
      then:
      - action: input_text.set_value
        data:
          entity_id: '{{ door_entity }}'
          value: '{{ trigger.event.data.event_label }}'
    - if:  	  
      - condition: template
        value_template: '{{ trigger.event.data.event | int == 6 }}'
      then:
      - action: input_text.set_value
        data:
          entity_id: '{{ door_entity }}'
          value: keypad unlock by user {{ trigger.event.data.parameters.userId | int }}
  variables:
    door_entity: '{% if   trigger.event.data.node_id == 4 %} input_text.front_door_lock_status
      {% elif trigger.event.data.node_id == 3 %} input_text.back_door_lock_status
      {% endif %}'

thanks I’ll try it. Hopefully all the attributes and property values are the same with zwave lock devices