Jump to content

Entry light - Door lock program


SteveG

Recommended Posts

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

Link to comment

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

Link to comment

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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...