What can you do if you inadvertently set off a motion detector that turns on a light on Shabbos - Can you keep walking? If I have one do I have to shut it off before Shabbos?
From here source #17 http://halachipedia.com/index.php?title=Electricity_on_Shabbat#Setting_Timers_before_Shabbat Sheivet HaLevi 9:69 permits walking in an area where there is a motion sensor that will activate a light, such as those attached to the outside of buildings. He explains that davar she’eino mitkaven refers only to when one does an action that may cause an unintended melacha. If, however, one is walking normally and makes no motion in order for a melacha to occur, it is not even a psik reisha as long as one’s intent isn’t to turn on the light. OrchotShabbat (p. 79) quotes Rav Elyashiv and Rav Nissim Karlitz who say that since one doesn’t have a direct connection to the melacha and doesn’t care about the light, it’s not called melechet machshevet. TheShabbos Home (p. 489) agrees.
Rabbi Mordechai Willig (“Halacha Engages Modernity Part 8,” min 50-60) challenges this line of reasoning because it should be considered a psik reisha d’nicha lei and turning on a light might be deoraitta. Furthermore, The 39 Melachos (p. 1215) says that if one can’t avoid walking in a place that will turn on a light because of a motion sensor and the streets are dark so that one will benefit from the light turning on, one shouldn’t leave his house! He does permit one to walk past such a motion sensor if he closes his eyes at the time when the light will turn on because in such a case then it is not considered niche lei, even if one will open one's eyes right afterwards.
On the other hand, Rabbi Hershel Schachter (“Electricity on Shabbos,” min 62-8) explains that if one is doing an action that is physically disconnected from where the melacha is occurring, it isn’t considered a psik reisha. Thus, Rav Schachter says that there’s what to rely on to permit walking in an area where there is a surveillance camera or a motion sensor which will turn on a light as long as one doesn’t have intent to be videoed or turn on the light.
Dayan Nueschloss ZT"L told me that it was not a problem to walk by such a light on Shabbos. I heard the same in the name of Dayan Falk.
Rav Ephraim Greenblatt told me that it probably is not a problem, but in his opinion if it can be avoided, then you should. He told me that he asked and reminded his gentile neighbors to turn them off before Shabbos and they were very good about it. (But that was in Memphis, in the buckle of the Southern Bible Belt)
Keep walking. Rav Wosner says that if you're just walking normally then there's no issue.