I am using PLEG for a few weeks now, but recently I noticed there was something strange about my setup.
I have a scene switch inside my door door lock to check if im home or not. I have also installed the Night&Day pluging to use in PLEG.
This is my PLEG setup:
Triggers:
FrontDoorUnlocked Voordeur: scene number 0 is activated
Conditions
FrontDoorUnlocked AND Night
Actions for FrontDoorUnlocked
Dimmer eettafel SetLoadLevelTarget newLoadlevelTarget=50
This should turn on the light at 50% only when its night. The problem currently is when im home (door unlocked) and it becomes dark, the light will also turn on.
How can I only turn the light on when the scene switch (front door) is unlocked?
FrontDoorUnlocked AND Night and (Night; FrontDoorUnlocked)
means that if the FrontDoorUnlocked and Night are both true
AND
Night becomes true, followed by FrontDoorUnlocked becoming true, then the action will fire.
If the FrontDoorUnlocked becomes true first, and then Night, this action will not fire.
It is a bit tricky at first, but it becomes 2nd nature after a while. Think of the first part as all of the things that have to be true first, and then the stuff in parentheses is the order in which they have to happen.
Best Home Automation shopping experience. Shop at Ezlo!