IFTT/WYZE Mode Restriction help

Ok I know there’s a workaround but I’m not quite getting it yet.

I have the Wyze pan mounted near front door and a connected porch light (cree)
I have IFTT app to turn on the bulb when motion from WYZE is detected. I only want this to occur after the alarm is turned on at night. And not to occur after sunrise. When alarm is set to on at night, ST mode is set to “WYZE detection on”. I’m using the lighting smart app to turn the bulb off after 5 minutes. I have morning routine to set ST mode to WYZE detection off"
I have created a virtual switch but I can figure out where to go from there

Please assist

your best bet is to eliminate IFTTT for the action and put the automation fully in SmartThings. You can create a virtual motion sensor in SmartThings and tie it to the Wyze camera motion via IFTTT. This is the virtual device I use for my Wyze cameras using this method.