What if u use a timer? Door open> start timer
Door closed > and timer is less then 10sec
Door closed flow Else do nothing