Sorry for the late replies, its been a long weekend.
So, I also have have a be469 (two actually) and am running 91.4. I tested the clear code again where a random number is set and it does seem to be working. So couple more quick questions, and you’ve probably already answered above so sorry if I’m asking again.
You are able to set the usercodes, and even change the user code using the lock package? I get that the codes clear from the input number when the time/day happens, just not clearing from the lock itself.
As far as the last person to unlock, I’ve tried that too and it also seems to be working. So the last person to unlock is really just a friendly name for the value from
sensor.lock_front_door_deadbolt_alarm_level
or whatever your lock name is. The sensor has nothing to do with the package. So, when you unlock the door you should see that value change to the slot # of the code used to unlock the door. Is it changing back to zero (aka master) or to slot 1 by itself?
Edit: I take it back, it did change back to slot one. But I realized it did not change for 17 minutes. It did not change when I locked it using HA, but it did change when I unlocked it manually after that. Can you confirm this is what happens to you.
Unlock the door and check the last person to unlock. Wait for 5-10 minutes, and leave the door alone. I suspect it will still be whoever unlocked it. Then lock it with HA (or also try locking manually), check the sensor state again.
Basically lets figure out which combinations cause the sensor to change back to 1 or 0, and we can get the logic for that.
Edit 2: Ive confirmed that at least for me locking the door manually with the turn key sets the sensor back to 1.
I’ll have to do some tweaking or if anyone else wants to. I’m a bit busy at the moment, but this is the code
frontdoor_code:
friendly_name: 'Last Person to unlock with Keypad (Front Door)'
value_template: >
{% set number = states('sensor.lock_front_door_deadbolt_alarm_level') %}
{% set entity_id = 'input_text.door_keypad_' + number + '_name' %}
{% set user = 'Master' if number == '0' else states(entity_id) %}
{{ user }}
need to set some logic to not change the user if the last lock action was manual lock
That can get gotten from here - sensor.front_door_report or probably from the lock itself.