danbutter Posted November 6, 2016 Share Posted November 6, 2016 I have been trying to get this program to work for a bit and it seems to work for one door, but not the other. Or maybe not both at the same time. I'm not the best with this type of logic. So I'll post it here and hope someone better at this can see why it isn't working for me. DwayLightAfter Sunset - [ID 0025][Parent 0001] If From Sunset + 15 minutes To Sunrise + 15 minutes (next day) And 'Outside / DetachGarageNorthDoor' Status is Open Or 'Outside / DetachGarageSouthDoor' Status is Open Then Set 'Outside / DetachDrivewayLight' On Else Wait 10 minutes and 20 seconds Set 'Outside / DetachDrivewayLight' Off any thoughts? Thanks for looking. Link to comment
stusviews Posted November 6, 2016 Share Posted November 6, 2016 Use parentheses for the Or statements. And ( 'Outside / DetachGarageNorthDoor' Status is Open Or 'Outside / DetachGarageSouthDoor' Status is Open ) Link to comment
larryllix Posted November 7, 2016 Share Posted November 7, 2016 (edited) Because AND has a higher order of operation than OR it is logically assumed you are doing this If ( From Sunset + 15 minutes To Sunrise + 15 minutes (next day) And 'Outside / DetachGarageNorthDoor' Status is Open ) Or 'Outside / DetachGarageSouthDoor' Status is Open Follow Stu's fix above Edited November 7, 2016 by larryllix Link to comment
danbutter Posted November 13, 2016 Author Share Posted November 13, 2016 Okay I finally had time to try this during daylight hours today and it seems to work ok. I wasn't aware of the parentheses. It did take me a few tries to get them in the correct order, but it worked. Thanks much for the help! Link to comment
Recommended Posts