Jump to content

Elk Module Light Rules


your2slow

Recommended Posts

Posted

Just loaded the new Elk Module and had some questions...

 

I'm trying to create a rule that when a door opens it will turn on a light for 2 mins then turn off unless the lights are already on.

 

Here is the code I'm trying...

 

If

Elk Zone 'Sliding Door' is Violated

 

Then

Set ' kitchen Valance Lights' on

Wait 2 mins

Set 'Kitchen Valance Lights' off

 

Else

-No Actions - (To add one, press 'Action')

 

With the above code, the light turns on when the sliding door is opened but will only turn off after 2 mins if the sliding door stays open. I'd like to have the light stay on for 2 mins even if the door is closed before that time.

 

Any help?

Posted

When the door status changes the Wait results in the IF being reevaluated and the Else runs because the If is now False. One solution is to put the Then logic in a second Program that is invoked from the Then of the first Program. That way the Wait in the second program will not be affected by the change in door state.

Archived

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

×
×
  • Create New...