Yep, as @cobra mentioned, at our house I use a dual device protocol so that the house knows whether I’m coming or going:
An as @csc mentioned there are lots of ways to do something similar as long as you can identify a specific condition that occurs every time you are on your way out versus on your way in.
Once you have identified such a condition, these days it’s much easier to set up the sequence test then the way I did it: you can just use webcore.
But it still requires identifying a sequence that will always work for you so you can set up a rule based on it.