Create home security system with Homey

Okay, so you create a flow that if the door gets unlocked with the key, the alarm should automatic disarm?

And when the smart presence detect theres noone home (perhapse also with a motion sensor) it should lock the door and arm the alarm