I'm trying to help my dad repair a post light at his house but can't quite figure out the wiring on it. I have the power line coming up to it, but it also has a photoelectric sensor on it to turn it on when it gets dark. This sensor has a white, black, and red wire running off of it. I had assumed that such a sensor would be a switch and you'd just have two leads. I can wire up the electrical outlet no problem, but I just dont know how such a switch is wired. Any help is appreciated.