Cut an empty toilet tissue tube or paper towel roll into 4-inch long sections with a pair of scissors. Any type of round tube that will fit over the electric eye and mounting bracket will work. Avoid bulky or solid materials that are not flexible.
Fit the tube over the electric eye and its mounting bracket. Leave 2 inches of the tube hanging past the end of the eye. This is usually enough to prevent direct sunlight from interfering with the eye.
Tape the opposite end of the tube securely to the electric eye body and mounting bracket with duct tape or thick packing tape. Avoid taping around the wires and wire connection.