Two Rules Conflicting

Hello and thank you in advance for any advice.

I have two rules that are conflicting and I'm struggling to determine how to fix. First I have a rule to lock the front door when the sensor is closed. I added a presence sensor and I want it to unlock the door when I get home. The problem is that there isn't an option for a state change e.g. going from not present to present. I originally I had it setup for when I'm present it unlocks the door. The problem is that when I leave and close the door and it locks but the system can still see me and it unlocks. Likewise, anytime I am home it keeps the door unlocked.

The way I envision this working is that the only time the unlock kicks off is when I pull up to the house and once I'm home it waits until I'm gone X number of minutes before it gets ready to unlock the door once again.

I hope that this made sense

David

Word of caution, when the batteries get low presence sensors have a tendency to go away and back when you are sleeping. If your ok with that risk try a trigger rather than a rule, as it should only happen when the presence changes I believe.

You may be having a problem because you are using a non-triggered rule. If the condition of presence and door locked is evaluated every time either of them changes then you are going to have the door locked immediately after it opens when you are home.

I think if you change it to a trigger for the presence sensor it only evaluates the rule or trigger once when it changes to present and then never again until the state of the presence sensor changes. Try mixing in a trigger or triggered rule if you haven't yet.

1 Like

@Terk, thank you for the information. I will keep that in mind while I navigate this process.

David

@codahq, your suggestion seems reasonable. I'll have to test it as a trigger and see how it reacts.

David