How is a light switch wired?
The most common requirement of any hardwired automated light switch is a neutral wire. This is a diagram of a switch with a neutral. The black “hot” connection is broken to turn the light on/off, the white “neutral” connection completes the circuit. The bare (hopefully) solid copper wire is the ground.