Hi,
I am trying to integrate a Yale lock into home assistant. So far all is good and I get a pushbullet notification when the lock is unlocked indicating the id number of the passcode used. What I would like to do is lookup that id in an external file to get the name of the person using that passcode.
Currently my notification message is:
14:15 - Unlocked with Keypad by user 2
I would like:
14:15 - Unlocked with Keypad by Bob
To do this I would like a separate (csv?) file to maintain mappings of user id’s to names such as:
method, user id, name
keypad, 2, Bob
I would prefer not to have this mapping in the code itself. I’m not sure if this is doable?
My existing code is below.
- id: 'front_door_unlocked'
alias: Front Door Unlocked
trigger:
- platform: state
entity_id: lock.assa_abloy_keyless_connected_yd_01_con_locked
to: unlocked
action:
#delay 1 second to give the attribute a chance to update.
- delay: '00:00:01'
- service: notify.pushbullet
data:
message: "{{ now().strftime('%H:%M') }} - {{states.lock.assa_abloy_keyless_connected_yd_01_con_locked.attributes['lock_status']}}"
- alias: Notify if Front Door Lock is jammed
trigger:
- platform: state
entity_id: sensor.assa_abloy_yale_conexis_l1_sd_l1000_ch_alarm_type
to: '9'
- platform: state
entity_id: sensor.assa_abloy_yale_conexis_l1_sd_l1000_ch_alarm_type
to: '17'
- platform: state
entity_id: sensor.assa_abloy_yale_conexis_l1_sd_l1000_ch_alarm_type
to: '23'
- platform: state
entity_id: sensor.assa_abloy_yale_conexis_l1_sd_l1000_ch_alarm_type
to: '26'
action:
- service: notify.pushover
data:
message: The front door lock is jammed
title: Home Automation
- service: notify.alexa_media
data:
target:
- media_player.living_room
data:
type: tts
You could consider using a file sensor which can read in json files with multiple values in a dictionary. Then you should be able access the keys and values in the automation.
Do you have any issue when unlocking your door by any card and the alarmlevel sets to 1 first every time, before setting to the alarmlevel to show the user name?
Because of this, im having a duplicate entry whenever the door is opened by a card (not by fobs though) so my sensor will go
Yeh, that’s what I’ve tried to do but then my sensor gets an “unknown” state, for a split second. Which wasn’t an issue if I wasn’t showing the last 5 accesses. However I’ve just set it to ignore from my log card, so I’m all good now. Thank you.
As a side note, are you using the Conexius app to add the cards etc? Whenever I try and add a sticky rfid tag it doesn’t accept it and then just doesn’t add anything further until I delete and reinstall the app… And don’t talk to me a out trying to delete keys from the app…!!
Not used the app for a long time, only when I first set up all the keys. It’s a crap app and I’ve contacted them about a few issues in the past and they still aren’t fixed.
One of my Schlages BE469s used to do this so I skipped code slot 1 and started my codes at 2… I’m not sure if the BE469ZPs still did that also because I still at this point just skip code slot 1.