This object is in archive! 

Rule for Lamp on and off

Melly shared this question 9 years ago
Need Answer

Hi Community,


iam again.....with a little question.

Now i try to build a rule:

if lux < 5 and motion = lamp on, then of no motion for 1300sec = lamp off

if lux > 5 lamp off


But it is not working....


Any suggestions??


Melly

Replies (5)

photo
1

Screenshot of the rule would help!

photo
1

Hi, I use the attached rule to turn on a light only when it's dark.

If light is off then it turn light on at a predefined level (as configured in scene). If light is already on it just keep it on without changing brightness.


Just a little note, I've set a sleep of only 1 second because I prefer to set blind time in motion sensor configuration.


Bye,


Carlo

photo
1

Hello,


oh i forgot the screen, sorry about that.


Hey Caro, the rule looks very good. Thanks you for your example.


Melly

Files: rule.png
photo
1

Hi Melly,


Notice the "Join" statement in Carlo's rule. This is important because it stops all other instances of the rule running.

Think of it like this, you want to trigger the rule when there is motion. So you walk past the sensor and there is motion and then the event is fired and the rule will be triggered.

BUT

You want the rule to complete it's logic

The main problem here is that there may be additional motion. This will then trigger the rule again. The "join" command isolates this rule from only running once therefore allowing the logic to complete.

Hope that helps

/Marcus

photo
2

Hmmm reading back my post I meant to say that the running rule gets overridden by a new instance of the rule so the join puzzle piece will terminate the previous version of the rule.

Leave a Comment
 
Attach a file