We do not recommend that you carry out this work yourself unless you are competent to do so
Answered by Dave, Electrical Safety Expert
We do not recommend that you carry out this work yourself unless you are competent to do so.
If you are competent to carry out the work then, details of the wiring in the motion sensor should be in the manufacturer’s instructions. If it is mains powered one wire will be neutral probably blue the other two wires will be line in and switched live. Refer to the manufacturer’s instructions.
Again, if you aren't competent to carry out this work, we would always recommend that you use a registered electrician. This gives you the peace of mind that if something does go wrong, the work is insured and their scheme operator can help you if you are not satisfied.
You can find an electrician local to you here.