Connect the Wires to the New Switch
With the ends of the wires stripped, they can be hooked up to the new switch. Wrap the end of the black wire around one of the wire connections on the back of the switch. Repeat with the white wire. Secure the wires with wire-connectors.
Note: With the particular sensor-switch used in our demonstration, it made no difference which power-supply wire went to which connection on the back of the switch. Either wire could go to either connection. Follow the wiring instructions that come with the switch you purchase.