I have a rule for motion lighting in my room where the lights will turn off when a certain illuminance is reached. The desired illuminance is set as a local variable (80)
However any change in illuminance (up or down) will trigger the wait expression.
dev:97 2021-12-01 09:33:47.224 am info Office Lights was turned off [digital]
app:497 2021-12-01 09:33:47.183 am info Action: IF (Office Lights is on) Dim: Office Lights: 0 --> fade: 2
app:497 2021-12-01 09:33:46.990 am info Office Motion Lighting: Actions stopped by Office Motion Lighting
app:497 2021-12-01 09:33:46.892 am info Action: Cancel Timed Actions: This Rule
app:497 2021-12-01 09:33:46.820 am info Wait over: Office Motion Sensor illuminance 62
app:497 2021-12-01 09:33:46.780 am info Office Motion Lighting event: Office Motion Sensor illuminance 62
dev:38 2021-12-01 09:33:46.711 am info Office Motion Sensor illuminance is 62 Lux
app:497 2021-12-01 09:33:26.150 am info Action: Wait for events: Illuminance of Office Motion Sensor is >= lux OR Office Lights turns off --> timeout: waitSecs
app:497 2021-12-01 09:33:26.130 am info Action: Fade Office Lights down to 0 over 1 minute with 3.0 seconds interval --> delayed: delaySecs(cancelable)
app:497 2021-12-01 09:33:26.074 am info Action: Set waitSecs to (delaySecs + 60.0)
app:497 2021-12-01 09:33:26.071 am info Action: END-IF
app:497 2021-12-01 09:33:26.068 am info Action: Set delaySecs to 120 (skipped)
app:497 2021-12-01 09:33:26.065 am info Action: ELSE (skipped)
app:497 2021-12-01 09:33:26.062 am info Action: Set delaySecs to 180 (skipped)
app:497 2021-12-01 09:33:26.059 am info Action: ELSE-IF (Mode is Evening) THEN (skipping)
app:497 2021-12-01 09:33:26.033 am info Action: Set delaySecs to 300
app:497 2021-12-01 09:33:26.030 am info Action: IF (Mode is Day) THEN
app:497 2021-12-01 09:33:26.025 am info Action: END-IF
app:497 2021-12-01 09:33:26.022 am info Action: Exit Rule (skipped)
app:497 2021-12-01 09:33:26.020 am info Action: Dim: Office Lights: 0 --> fade: 2 (skipped)
app:497 2021-12-01 09:33:26.016 am info Action: IF (Illuminance of Office Motion Sensor is >= lux) THEN (skipping)
app:497 2021-12-01 09:33:25.980 am info Action: IF (Office Lights is off) Exit Rule (skipped)
app:497 2021-12-01 09:33:25.911 am info Wait over: Office Motion Sensor motion inactive
app:497 2021-12-01 09:33:25.905 am info Office Motion Lighting event: Office Motion Sensor motion inactive
dev:38 2021-12-01 09:33:25.812 am info Office Motion Sensor is inactive
app:497 2021-12-01 09:33:06.798 am info Action: Wait for events: Office Motion Sensor inactive
OR Illuminance of Office Motion Sensor is >= lux
OR Office Lights turns off
app:497 2021-12-01 09:33:06.766 am info Action: Dimmers per mode: Office Lights
Day: 100
Evening: 70
Night: 20
app:497 2021-12-01 09:33:06.594 am info Office Motion Lighting: Actions stopped by Office Motion Lighting
app:497 2021-12-01 09:33:06.539 am info Action: Cancel Timed Actions: This Rule
app:497 2021-12-01 09:33:06.474 am info Office Motion Lighting Triggered
app:497 2021-12-01 09:33:06.462 am info Office Motion Lighting event: Office Motion Sensor motion active
dev:382 021-12-01 09:33:06.404 am info Office Motion Sensor is active
It should only match the expression when it is higher than the desired level. In this case 62 is < 80, so the expression should not have been matched.