Trying my hardest to get this rule working but it seems to be above me for now! any reason why the lights seem to stay on? basically wanted it so that if the area is dull the sensor turns the lights on bright then if in night mode the lights dim down and turn off quicker...any ideas?
The « Wait for …. » will be cancelled automatically when the rule is run again.
I suspect that sometimes, when your rule triggers, the if and else-if conditions will be false. Therefore, the « wait for event… » trigger will not run since it’s been cancelled.
Instead, what I would recommend is that you remove that from both if conditions, and in a 2nd rule do the following:
Trigger:
Landing lights - Top Floor turns on
Actions:
Wait for event: Sensor - landing Top Floor motion inactive and remain that way for 0:01:00
Off: Landing lights - Top Floor
How often does your illuminance sensor trigger? These devices can sometimes trigger a bunch causing issues with rules. I’d do something similar to @Sebastien but keep it all in one rule.
Required Expression
Private Boolean is True
Trigger
Motion sensor active
Action
Set Private Boolean to False
If Lux is greater than 125
Set Private Boolean to True
Exit Rule
Else-if Mode is Day, Evening, or Morning
Set lights to Bright
Else-if Mode is Night
Set lights to Dim
End-if
Wait for Event - Motion Inactive and stays one minute
Turn off Light
Set Private Boolean to True
This rule will only trigger with motion. The Private Boolean prevents retriggering. If it is already Bright the rule will exit after setting the Boolean true again. If the Lux is below 125, the rule will then evaluate Mode and set the lights appropriately. Once the lights are set, the rule waits for the sensor to go inactive and stay that way for one minute before turning off the light and resetting the Boolean.
Thanks all, I’ll update accordingly
Here's an option that should work.
Trigger
Sensor - landing Top Floor motion active
Actions
IF (Mode in [D, E, M] AND Illuminance < 125)
Dim: Landing lights: 100 --> fade: 3
ELSE-IF (Mode is Night)
DIM: Landing lights: 15 --> fade: 2
END IF
Wait for event: Sensor - landing Top Floor motion inactive and stays that way for 0:01:00
Off: Landing light