Timer for bulb after contact open

Shortcut Question.
I want to have a wyze bulb come on when sensor is opened and then go off after being on for a specified period of time. Then reset to repeat when the door contact is closed again. Seems like a logical shortcut but I don’t know for sure. Have any of y’all done this.?

Seems like this should work. I wan to know for sure before purchasing the bulbs. I would test for it if I had the bulbs. Thanks for your help