IIRC, the trigger functin kicks off the routine when the the trigger is released. This will be an issue with hacking a motion stop light because they hold the trigger on for the amount of time that the light would be on. If the light has a test function, that usually only holds the trigger for a few seconds and would work much better for this purpose.