Looks good to me too! (But I'd also add the
END-IF to be polite--a good habit, and in other cases it could matter; RM will infer it here.)
If you wanted to save some clicking, presence has only two states (present or not present), so your
ELSE-IF... could just be an
ELSE (which given this would also only match on "not present"), but again, what you have is logically equivalent and there's no reason to change.
That being said, 10 minutes seems like a bit of a long delay for setting "Home" mode on alarm system (EDIT: wait--you're setting it when someone else leaves?), particularly if you have alarms or notifications tied to it and presence is sensitive enough to not detect them until they're basically home, but I'm assuming you know what you're doing there more than we do.