If X, Then Y, if Z ? (Stacked conditionals)

Need some help with some fairly simple logic, that Smartthings or IFTTT don’t have internally.

If X, Then Y, if Z

X= Presence via Phone (home or away)

Y= Garage Door Trigger (only can send a “go” command, which will be either up or down depending on the current state of the door, like the little switch on your wall in your garage)

Z= Tilt Sensor on Garage Door (closed or open)

Very Simply:

If I leave the house, send go command to the door, if the door is open.

If I leave the house, do not send go command to the door, if the door is already closed.

If I arrive, send go command to the door, if the door is closed.

If I arrive, do not send go command to the door, if the door is already open.

Smartthings doesn’t allow conditional expressions, and I can’t figure out how via IFTTT or Virtual Switches to fake it out to allow me to do this. I also don’t know how to use SmartApps or how to code them, so I’m pretty useless.

The short answer is webcore, but the following FAQ should help (this is a clickable link)

1 Like
1 Like

As already stated, WebCoRE is the best and cleanest way to do this. However, you could also accomplish it in Smart Lighting with just a couple of extra steps. First, if you don’t already have rules to set modes related to your presence (like, setting the mode to “Away” when your phone is not present, or to "Home when it is) then do so. Then it’s just a matter of creating two rules to send your “go” command (whatever that evaluates to)…

  1. When the door sensor indicates “Open”, but only if the mode is “Away”.

  2. When the door sensor indicates “Closed”, but only if the mode is “Home”.

2 Likes