SteveG Posted July 14, 2014 Posted July 14, 2014 Have a program that won't evaluate true when I think it should. Light is off and I am unlocking the door. If Status 'Front Door Entry Light' is Off And ( Control 'Front Door Lock' is switched Key/Manually Unlocked Or Control 'Front Door Lock' is switched Unlocked by Keypad Or Control 'Front Door Lock' is switched Remotely Unlocked ) Then Set 'Front Door Entry Light' On Wait 30 seconds Set 'Front Door Entry Light' Off Else - No Actions - (To add one, press 'Action') Can someone help me out with the above program? I just want to have the front entry light turn on temporarly when the door is unlocked, EXCEPT if it's already on. I am guessing I am messing up with the parenthesis but I am new and still getting the syntax down. Thanks, Steve
MWareman Posted July 14, 2014 Posted July 14, 2014 Not sure about the IF, but when it does trigger and the light turns on, the Then will immediately stop and the light will not turn off. You will need to separate to two programs.
SteveG Posted July 15, 2014 Author Posted July 15, 2014 And that would be my problem! Seperated it and it worked like a charm. Just as a reference if anyone else stumbles upon this thread looking for an answer: Program 1: DoorUnlock If Control 'Front Door Lock' is switched Key/Manually Unlocked Or Control 'Front Door Lock' is switched Unlocked by Keypad Or Control 'Front Door Lock' is switched Remotely Unlocked Then Run Program 'LightOn' (If) Else - No Actions - (To add one, press 'Action') Program2 (Disabled so it only runs by the first programs call): LightOn If Status 'Front Door Entry Light' is Off Then Set 'Front Door Entry Light' On Wait 30 seconds Set 'Front Door Entry Light' Off Else - No Actions - (To add one, press 'Action') Thanks again MWareman! ~Steve
MWareman Posted July 15, 2014 Posted July 15, 2014 (edited) No problem! Glad it helped. You actually don't need anything in the 'if' of your disabled program. Not hurting, just not required. In the first, change the 'Run If' to 'Run Then' to make this work though. I find it cleaner. Edited July 15, 2014 by MWareman
Recommended Posts