Lights turn on based on multiple criteria (AND)

I’m attempting to look for a Lighting smartapp that uses multiple criteria. For my case:

Garage Lights on IF

  1. Presence Detected AND
  2. Garage Door Opens AND
  3. Time after 7PM or Sunset (either one will work)

It would be nice to set a timer as well for the lights to be on and for the lights to turn off.

The default routines uses an OR I believe. and the SmartLighting can do 1 & 3 but not when Contacts Open/Close. Hopefully someone could just add the code “Only when contacts are”

Please let me know if anyone has worked on this already. I tried putting some code together but it’s mainly me meshing other templates together and trying to make it work.

Thanks.

See the following FAQ:

Could use home mode only for present time is already an option (I’d use Sun set to sunride) then the sensor. Using smart lighting

Thanks. I think I overlooked this post. Let me give it a try.

Yeah I thought about this one. The only thing I was hoping for is that additional feature of turning off at a certain amount of time. Thanks for sharing.

Turning off after a certain amount of time is easy to add to your list of conditions with WebCore. WebCore is essentially a scripting language for SmartThings and is designed for complex conditionals. See the FAQ above for more information. :sunglasses:

Off after time, use the power allowance setting in the smart lighting. I have a general one the covers multiple lights and device which turns them off after 10min i use it on garage lights and outside lights

1 Like