I am considering making an automation for a door lock, and I am a little bit unsure where to start. I have one sensor which put the house in "away" I can give it a value "1" Then I have another sensor on my garage door. Which tells if its open or not (0,1). What I want to achieve is the following.
I leave the house, put it in away mode and my door lock locks my front door. Then I open my garage door and I dont want anything to happen when the sensor change from 1 (Garage door closed), to 0 (Garage door open) And I also want nothing to happen when my garage door closes, 0 to 1. But then when someone arrive and open the door I want the signal changing from 1 to 0, to trigger my door lock. When entering the front door the house goes to mode "Home" and it can do a reset.
I assume during nice weather in the summer that it is a possibility that the garage door is open so maybe it should have to wait for the change value when garage door goes from open to closed, to fire the event next time it changes from closed to open again.
Hope this was understandable and that anyone can point me in a direction where I can solve this.