Replacing a PIR light switch with a timer switch
Switches normally just "make or break" the hot lead. Neutral conductors should never be connected to switches except for PIR wall switches and many wall timers. They need to have a neutral connector.

So you should have:

1) constant live hot wire (normally black in USA, but you never know without testing)

2) switched hot wire that delivers switched power to the load (I use red for that, never know...)

3) ground wire (green or bare)

4) Neutral wire (normally white...)

Carefully test, you should be able to identify.