ST motion sensor with Kasa switches

I’ve had ST hub v3 and 2nd gen motion sensors in my garage for about a year now. I also have 2nd gen multi sensors on the 2 service doors.

I cannot for the life of me get the lights to stay on after my 5 minute timer is up. I’m using the motion sensors with TP-Link Kasa light switches.

I have 3 automations in total for garage. One is if either door is open than turn on lights (no auto-off). 2 automations set for the motion sensors. First one is “turn on lights if motion” (no auto-off) Second is “turn off lights after 5 mins of no motion”

I’ve sat and watched my ST app and to make sure its picking up motion but still shuts off after 5 mins. As I’m sitting here, it seems to be working but I’ve tested dozens of times watching the ST app and my motion sensor and will still shut off lights.

Is it my automations or something to do with the light switche timer and ST? TiA

You want the lights to stay on after 5 minutes when door is open?

if yes, try adding… door sensor is closed as a precondition to the turn lights off after 5 minutes. that way if door is open, the automation will not run