I wanted to make my outside lights turn on at dusk and off at dawn so I added a photosensor. I ended up with a problem where the light coming on and dusk would cast light on the sensor causing it to go back off. This cycle would continue every 30 seconds. I needed a hood that would allow sunlight to hit the sensor but would shield the sensor from the light of the lamp. After four tries I came up with this hood which works and is adjustable by twisting it. The 17mm inside diameter of this hood fits the photosensor snuggly. If you use a different photosensor you may have to adjust the hood inside diameter.
I installed the Intermatic photosensor by drilling a hole in the face of the lamp base using a step drill. Two wires connect to the house wiring and the third wire goes to the light bulbs. I used LED light bulbs which also makes my installation energy efficient.
You must use supports since the hood part is cantilevered. I suggest that you print in ABS or PETG since this will be outside. PLA probably won't hold up in sunlight.
Bed with BuildTak 85C
0.2mm layer height