Change scene based on illumination

Hi all,

I have a light that I would like to turn on and change color, based on illuminance.

Illuminance <= 1000

Actions for TRUE:
IF Illuminance <= 1000 and >=500 THEN activate scene Cold_White
ELSE IF Illuminance < 500 THEN activate scene Warm_White
Repeat every 0:05:00 (stop on truth change)

The rule works. The correct scene is activated according to illuminance. However, if the light is on Cold_White and the illuminance drops under 500, the scene doesn't change (neither does it change the other way round). I have set the rule to repeat, but still no success. If I press "Run the rule" button, the scene does change...

Any ideas how I should make such a rule?


That's because the conditional actions don't cause the entire rule to be re-evaluated. I would break this out into 2 rules with separate actions for true for each. One rule for 500-1000 and one for <500.

Now why didn't I think of that...???

One more question: any idea how I can prevent the light from discoing if the illuminance fluctuate around the turning point?

Well, what type of illuminance sensor are you using? If you're talking about the weather report, that should only poll every few minutes. Also, you can split it appart and create a dead-band. So, have 550-1000 and 0-450. If you don't have any action for false, then the lights would stay at whatever setting they were at until the other rule kicks in to change them. So, if you have Illuminance of 900 so cold white is active...cold white would stay active until the illuminance was below 450. But it would not re-trigger back to cold white until it got to 550. You could also use 475 and 525, i don't know how much your lum sensor fluctuates.

Sorry to barge in on your thread. Hoping you could explain how you are using a range comparison in your If-Then condition? I didn't know that was possible?

Two conditions :smiley:

Thanks, I'll play with the dead-band.
I've also just noticed that there's a setting "Lux Reporting Threshold" in the motion sensor device where I can tell it to report every 10 or 100 Lux (It was set on 1) I'll play with that too.

By the way, I've split the rule in two. Works like a charm! Thank you.

Got ya, that's what I'm doing now, your original description made it sound like you were doing it in a single condition.

I assumed it was one condition for the overall rule and then one condition in the conditional action. It would be wonderful if we could have grouped conditional actions. That would bring us almost to the full functionality of WebC...... The App That Shall Not Be Named. :zipper_mouth_face: