To follow up on what JD said, here an app that’s pretty comprehensive for managing locks and users. One option is to have it relock a door after a period of time (you can even include a door sensor optionally so it won’t relock an open door). As an example you can set it to automatically relock doors only if the hub is in a specific mode, say night. So at night if you accidentally unlocked the door, it’ll relock itself after X minutes (one of over a 100 features in this app).
3 Likes