I’ll take each of your points individually. The consequence of having both the switch and your motion sensor be the trigger is that both will cause the piston to fire. Therefore, if you change one of the two dimmer on, and motion is active, the piston will fire, turning on both dimmers for a set period of time and then turning them off. I don’t know the specific application…this might not be a problem. I just wanted to make sure that you were aware that both the dimmer state and the motion sensor are both triggers here.
As far as the motion sensor not triggering during the “shutdown” phase we’ll call it…most motion sensors have a configurable parameter, either through code of hardware, for a “timeout period”. This is a period of time that the sensor will remain in an active state after motion is no longer detected. This is to prevent too many messages going back and forth unnecessarily. So, check your motion sensor to see what time timeout is.
And that brings me to my last point, turning the lights off. Depending on the timeout of your motion sensor, you could change the structure to turn the lights off when motion goes inactive. That’s the great part about motion sensors, you can keep the light on when motion is detected. In your setup, the light will go out after 3 minutes, regardless of whether motion is still active or not. As long as the sensor continues to report motion, the lights will not come on. You would have to wait for the timeout of the sensor, the sensor would then switch to inactive, then you could move again and have the lights come on. That’s one of the drawbacks of using a timer to turn the lights off. If you are going to use a timer rather than motion detected, I would recommend setting your motion sensor timeout to something very small, like 2 seconds. That way, you won’t get caught with the lights out. However, the best way, IMHO, is to set the timeout for your sensor at 3 minutes and turn the lights off when the sensor reports inactive. That way the lights will stay on as long as motion is detected and then 3 more minutes, just in case you’ve only stopped moving for a second.