Connecting a Photoelectric Switch

Can anyone help shed some light on this?
I bought this Light sensor to install on my floodlights outside.
I live in an older building so the wiring is not what it should be.
The lights are connected very simply with a Black wire and a White wire.
I assume I connect White to White and Black to Black from the light sensor, but what do I do with the Red wire? There’s no Red wire coming from inside the junction box. The only wires coming from the Junction Box is Black, White, and Ground.
The Photoelectric Switch has this configuration of wires coming from it:
White(Neutral) Red(Load) Black(Line)
Any help is appreciated.

Assuming you are going to keep the switch for the light on all the time (the wall switch) then, you want to tie all 3 white wires together (wire coming into the box, photo cell and light). Then tie the black wire coming into the box to the back photo cell wire and the red photocell wire to the black light wire.

For future reference, line refers to power coming from the breaker panel, load refers to what is being powered. (The light in this case. )

Thank you Todd.
That’s exactly how I have it wired but for some reason the light stays on even if I have my flashlight pointed right into it. I can hear a slight “click” when I do this and the same “click” when I cover the photo cell. The light just will not turn off.
maybe a faulty photo cell?

Seems like if it clicks, it is wired correctly, so perhaps a faulty switch.

I’m guessing you have the two black wires swapped and the light is getting power all the time. The red wire should only be connected to black wire that goes TO the light. If you have both blacks and the red connected together or if you have the black wire FROM the breaker connected to the black that goes TO the light then the light will stay on all the time regardless of the status of the light sensor. Since you are hearing it click my guess is that you have both blacks and the red connected together, otherwise the sensor wouldn’t have power and wouldn’t be clicking based on light changes.

Thank you Todd Thank you Mike.
After re-reading Todds post and seeing Mike’s post I realized I had it wired incorrectly. After a quick re-wire It all works perfectly now. Thanks to both of you for your help.