Auto lock door only after door is closed using PLEG

OK hopefully I figured the way to save and post the PDF you wanted to see … Sorry it took so long
Let me know if this is what I needed to show you for help. THX

[quote=“jrweiland, post:18, topic:197207”]Just throwing this idea out there-- could you achieve your overall goal through a simple scene? Here’s what I’m thinking.

I like the idea of it doing a “lock check” every 10 mins or so. It would be a good way to make sure that your door was locked again, in case it was randomly unlocked.

But thinking about my personal habits, any time I unlock my door, I always close it after that. It’s never hanging open.

What if “closed door” is a better and easier trigger to use? A scene that said “any time the door is closed, the door will lock X minutes later” might achieve what you’re looking for.

Just a shot in the dark :)[/quote]So this is kind of the band-aid for people who don’t use pleg or lua to achieve the end result. The way to achieve this is by using the just the door sensor correct in the scene as the trigger? This works on some level if that is the case.
The trouble lies is when someone accidentally unlocks the door or whatever and never actually open the door, like you mentioned. The scene only will run when the door(Sensor) was actually opened and armed in my case… Then the door will stay unlocked until the door lock check scene runs (Which I have set to one hour to save battery life). Now with this scene it actually will still lock the door whether or not the door sensor is in the closed or open position. This is why I called it a band-aid. Does this make sense or am I missing something in the above statements. Is there something I can add during the door lock check to make sure it only runs when the sensor is in the closed position and the door is unlocked. Do I just add the sensor into the door lock check trigger as well? I dont think that will work because that would be an and/if statement and vera doesnt support that without code from my understanding. I could be way off here, im learning as I GO… lol