1st Rule in RM

Needing some help on how to set my first rule. Still trying to figure all this out. Can someone help me with what I need?........ Basically I need it spelled out for me. When I lock my Kwikset, I want to trigger my Ecobee into away mode. Once I punch in the code to unlock it, I want to put it in Home mode. Can someone tell me exactly what I need to do in RM? TIA!

Two rules are needed... Maybe... I would make two rules for simplicity sake.
See below:

Edit: This is a little dumb below. I wouldn't do this first one.

You will probably need an additional type of sensor otherwise whenever the lock is locked. The mode will set to away even when you are still at home.
Maybe a presence sensor or time restriction.

1 Like

If you want to trigger by lock code instead of just unlock (to differentiate between users/codes and manual/keypad unlock) you can set up as follows:

Unfortunately there's not currently a way in RM to differentiate between manual and keypad lock.

Edit: It was kinda late. Yea being away whenever the door is locked sounds bad.

Presence detection is the best tbh, or a button for clear intention.

Thanks for all the help! I'll keep poking around at it.