Auto-Lock after Auto-Unlock only if door is closed (if door sensor is available)

link to a similar request