this should work for autolocking your door after 9pm if left unlocked for 10 mins - be sure to change ‘your_lock’ with the name of your lock
automation:
- id: 'lock_after_10_mins_when_ after_9pm'
alias: 'lock after 10 mins when after 9pm'
trigger:
platform: state
entity_id: lock.your_lock
to: 'unlocked'
for:
minutes: 10
condition:
condition: time
after: '21:00:00'
action:
service: lock.lock
entity_id: lock.your_lock
I’m going to try to install @ptdalen 's door-locks.yaml package soon, one question though: is there a Lovelace UI config available for it already? Im not using the old UI config, just Lovelace, has anyone have a template for this lock package on Lovelace? Would be great!
Circling back to changing the code length, I’m testing @ptdalen’s lock package right now and I don’t see the option of changing the code length (the amount of digits for user codes), don’t see anything in the code either. I know it will reset all codes when you do but it would be great if this was added. Is this in the pipeline still? How would I add that feature? Thank you for all the work and sharing it.
You can change the code length under “Configuration -> Zwave” find the lock and then under settings you should find many possible settings, one of which is code length. Like you already noticed, changing the length, will erase all codes. I was working on getting this in my package, but felt like these kinds of settings are usually something you’d set up once, and leave, and had a higher possibility that someone would erase their codes accidentally. Also, might just be me, but the only time I ever have issues with my locks is when I’m changing Zwave settings. Not every time, but sometimes.
@ptdalen I don’t want to jinx it but I think I just got your door lock package working and I am THRILLED. I’m a noob to all of this but your code was so clean and well commented that even I was able to figure it out which is no small feat. Pro tip for anyone following this thread @ptdalen created one and two lock versions of his code so you don’t have to spend a bunch of time deleting extra locks and associated code (like I did before noticing it was available)
Three questions…
It added 30 ungrouped sensors up along the top of my UI for keypad 1-15. “Turn keypad 1 off”, “Turn keypad 1 on”, “Turn keypad 2 off”, etc. What are those and did I mess something up to make them ungrouped? entity_id is “sensor.keypad_1_temp_lock_turn_off”
Has anyone had success using this with the ios notify component? I’m sure I need to change something in the message title template but I’m at a loss on where to start.
- service: notify.ios_garrett_iphone
data_template:
message: >-
{% set object_id = trigger.to_state.object_id %}
{% set code_slot = object_id[7:-18] %}
{% set usercode_input = 'door_keypad_' ~ code_slot ~ '_code' %}
{% set usercode = states['input_text'][usercode_input].state %}
{% set name_input = 'door_keypad_' ~ code_slot ~ '_name' %}
{% set name = states['input_text'][name_input].state %}
{% set start_input = 'door_keypad_' ~ code_slot ~ '_date_start' %}
{% set start = states['input_datetime'][start_input].state %}
{% set end_input = 'door_keypad_' ~ code_slot ~ '_date_end' %}
{% set end = states['input_datetime'][end_input].state %}
The pin code {{ usercode }} is now temporarily enabled for {{ name }} from {{ start }} to {{ end }}.
title: >-
{% set object_id = trigger.to_state.object_id %}
{% set code_slot = object_id[7:-18] %}
{% set switch_input = 'door_keypad_' ~ code_slot ~ '_front_switch' %}
{% set switch_name = states['input_boolean'][switch_input].attributes.friendly_name %}
Beach House: Temporary code enabled on {{ switch_name }}
Executing the Delete Door Code command isn’t working for me right now. I’ll dig a little deeper into the thread and see if others have had the same problem. I’m using a Schlage BE469.
UPDATE Looks like I need to try and update zwave; currently stumbling around trying to figure out how to do that.
Really really appreciate all the work you put into this. Can’t thank you enough!
I just looked at how the groups are made in the old ui and recreated them in lovelace with entity cards. Here is one page I created for the lock codes. I have configuration menu and status cards on a different page, but I think you get the idea.
Hi @garrettshannon, I’m looking to add @ptdalen component to my HA as well but haven’t been able to find the one lock version you mention. Do you have a link to it by chance? I was about to start deleting all the code for lock 2 and 3 like you did and then happened to see your response. Thanks!
wow… not sure how i missed that. I saw “door_locks.yaml” and completely didn’t see the txt files below. I was having problems with zigbee stuff and had a long night I guess. Thanks for the quick reply!
Do you have a git hub where I can look at the yaml for these directly. Also could you possibly format your post using the formatting block.
I will say I’ve really not gotten into the lovelace yet, so thanks for taking this part on. Once I get around to it, I’ll post the lovelace in my repository as well.
I’ve kinda been working on getting my stuff up on github, but haven’t really tried, so don’t have that going yet. I thought I did use the formatting block, not sure why my dashes turned into bullet points…
I’m at work right now and won’t have access to my configs until tomorrow. I’ll try to repost then.
Btw, I split it up so I could see the config options and the info menu on my main Home page, while I have all of the granular code options on a separate page, as there are so many of them. Basically all I did was take what was a “group” in the old interface and made an Entity card of each “group” in lovelace. Just wanted to expound on what I did and why, once you get used to looking at the code and seeing what’s going on you should figure it out pretty easily.