If statement with triggers and logical OR


#1

1) Give a description of the problem
I want to have a specific action take place, triggered by any one of three different triggers.

2) What is the expected behavior?
I want the outside lights to come on if:

  1. If open the door
  2. If there is movement outside
  3. If my phone is within the geotag boundary

3) What is happening/not happening?
I am wanting to use each of the triggers in one If statement, with logical OR between them. Will this work right? If not, how would you suggest approaching this?


#2

Generally, it is best practice to use a single trigger on top and conditions beneath. Presence triggers are hit and miss within webcore. It has worked well for some. It has not worked well for me. Lag time is the issue for me, especially when doing something like turning on lights - you are standing in the dark waiting on the light to come on. Testing would be required.


#3

Thanks. That is how I have started approaching it … making a piston for each trigger, and then having the same action in each of the pistons. Seems to work, but not very elegant …


#4

I found the same issue with presence detectors within webcore. I ended up creative a VS and having the ST app turning it off. Since creating and using the VS I have very little to no issues.