limit detection angle of a motion sensor light switch
I did the same thing for a motion sensor in my alarm system. A window in the corner of the view was causing false alarms. 

I am assuming that your sensor is similar, it has a semicircular translucent cover over the IR sensor. I disassembled mine and put black electrical tape on the back side of the translucent cover to block part of the view.

You could also put tape on the front, but it won't look as nice.