Using 2 Motion Sensors To Turn Off Lights

Hello. I have a few rooms with multiple motion sensors to control lighting. The problem I am running across is with the routine that turns off the lights. I have a routine setup to turn off the lights if there is no motion on the 2 sensors after XX minutes. The routine appears to use an OR statement instead of an AND statement for the sensors. So, currently, if either sensor doesn’t show movement for XX minutes, the lights turn off. I need some way of saying if BOTH motion sensors haven’t shown movement for XX minutes then turn off. Any suggestions on what I should use? I have the Smart Lighting app setup to turn on the lights when there is motion on either sensor, and for testing I enabled the option on the smart app to turn off the lights after XX minutes, but I am not sure if that will give me the results of both sensors or just a single sensor.

1 Like

Mike Maxwell has an excellent smartapp which can combine multiple sensors into one zone and solves exactly this problem. Very popular. :sunglasses:

Alternatively, you can use core, but the set up is more complex.

If you haven’t used custom code before, it’s pretty straightforward. Basically you will copy the author’s code and paste it into your own account. Here’s the FAQ for that:


Awesome! Thanks so much. I’ll get this installed and give it a try. I appreciate the help.

1 Like