Here is my template for it. Pretty much went through different posts on the web and found examples, then went through the engineering guide (http://ozw.my-ho.st/Yale/Yale%20ZWave%20Developer%20Guide.pdf) and modified examples to get what I wanted.
You will have to replace <person’s name> with whatever name you want, change “front_door_lock” to match your entity name (default is something like “assa_abloy_yrd_446_blah_blah_blah” can’t remember off top of my head) , and probably add/remove names/codes to match your situation.
I tried to get most relevant items out of that guide and so far everything has worked, but haven’t been able to try some like the low/critical battery yet (still at ~85% battery after almost 9 months)
#############################################################################################
##### Front Door #####
#############################################################################################
- platform: template
sensors:
template_front_door_lock_status:
friendly_name: 'Front Door Lock Status'
value_template: >-
{%- if is_state("sensor.front_door_lock_alarm_type", "112") -%}
{%- if is_state("sensor.front_door_lock_alarm_level", "0") -%}
Master code changed at keypad
{%- elif is_state("sensor.front_door_lock_alarm_level", "251") -%}
Master code changed over RF
{%- else -%}
User added to slot {{ states.sensor.front_door_lock_alarm_level.state }}
{%- endif %}
{%- elif is_state("sensor.front_door_lock_alarm_type", "33") %}
User deleted from slot - {{ states.sensor.front_door_lock_alarm_level.state }}
{%- elif is_state("sensor.front_door_lock_alarm_type", "161") -%}
{%- if is_state("sensor.front_door_lock_alarm_level", "1") -%}
Tamper Alarm - Keypad Attempts
{%- elif is_state("sensor.front_door_lock_alarm_level", "2") -%}
Tamper Alarm - Escutcheon Removed
{%- else -%}
Error - Tamper Alarm
{%- endif %}
{%- elif is_state("sensor.front_door_lock_alarm_type", "25") %}
Unlocked by RF
{%- elif is_state("sensor.front_door_lock_alarm_type", "19") -%}
{%- if is_state("sensor.front_door_lock_alarm_level", "1") -%}
Keypad Unlock - <person's name>
{%- elif is_state("sensor.front_door_lock_alarm_level", "2") -%}
Keypad Unlock - <person's name>
{%- elif is_state("sensor.front_door_lock_alarm_level", "3") -%}
Keypad Unlock - <person's name>
{%- elif is_state("sensor.front_door_lock_alarm_level", "4") -%}
Keypad Unlock - <person's name>
{%- else -%}
Unlocked by user slot {{ sensor.front_door_lock_alarm_level }}
{%- endif %}
{%- elif is_state("sensor.front_door_lock_alarm_type", "21") -%}
{%- if is_state("sensor.front_door_lock_alarm_level", "1") -%}
Manual Lock - Inside Thumb Turn
{%- elif is_state("sensor.front_door_lock_alarm_level", "2") -%}
Manual Lock - Touch Function
{%- elif is_state("sensor.front_door_lock_alarm_level", "3") -%}
Manual Lock - Inside Button
{%- else -%}
Error - Manual Lock
{%- endif %}
{%- elif is_state("sensor.front_door_lock_alarm_type", "22") %}
Manual Unlock
{%- elif is_state("sensor.front_door_lock_alarm_type", "24") %}
Locked by RF
{%- elif is_state("sensor.front_door_lock_alarm_type", "18") -%}
{%- if is_state("sensor.front_door_lock_alarm_level", "1") -%}
Keypad Lock - <person's name>
{%- elif is_state("sensor.front_door_lock_alarm_level", "2") -%}
Keypad Lock - <person's name>
{%- elif is_state("sensor.front_door_lock_alarm_level", "3") -%}
Keypad Unlock - <person's name>
{%- elif is_state("sensor.front_door_lock_alarm_level", "4") -%}
Keypad Lock - <person's name>
{%- else -%}
Keypad Lock by user slot {{ sensor.front_door_lock_alarm_level }}
{%- endif %}
{%- elif is_state("sensor.front_door_lock_alarm_type", "38") -%}
Non Access Code by user slot {{ sensor.front_door_lock_alarm_level }}
{%- elif is_state("sensor.front_door_lock_alarm_type", "167") -%}
Low Battery Level - {{ sensor.front_door_lock_alarm_level }}
{%- elif is_state("sensor.front_door_lock_alarm_type", "168") -%}
Critical Battery Level - {{ sensor.front_door_lock_alarm_level }}
{%- elif is_state("sensor.front_door_lock_alarm_type", "27") -%}
Locked by Auto Lock
{%- elif is_state("sensor.front_door_lock_alarm_type", "113") -%}
Duplicated PIN from RF in slot - {{ sensor.front_door_lock_alarm_level }}
{%- elif is_state("sensor.front_door_lock_alarm_type", "130") -%}
Power To RFM Was Restored
{%- elif is_state("sensor.front_door_lock_alarm_type", "131") %}
Disabled User Code Entered from slot - {{ states.sensor.front_door_lock_alarm_level.state }}
{%- endif %}