No, the gate is triggered with a switch only, no PIR.
The uploaded code is from the shared project below: