Help with a rule please

I have created a rule based on lux and time of day for certain lights to come on and go off. Basically if it is a cloudy sort of day I want the lights to be on. But it isn't working. My undercabinet lights stay on all day. I think I am not understanding the Rule and Conditions in RM 3.0. Here is my rule. Any help would be greatly appreciated.

Looking at this. The only time I think this will run is if your lux vs is off.

Do you have an option to set it to lux vs change?

And in your if statements for true and false have it look at if the vs is on or off.

I could write this in 4.0 much easier. Something like the following.

Lux vs change

If lux vs is on
And time is x and x
Then
Do this
Else if lux vs is on
And time is x and x
Do this
Else if lux vs is off
And time is x and x
Do this
End if

I only want it to run when the Lux VS is off. So in other words, when the lux is below 30 I want the lights to come on if it is between certain times of the day.

OK I will try that and see how that goes. Thanks!

So this is how I have the rule right now. However, my undercabinet lights are on right now but my Living room lights aren't even though they should be.

Here are the logs:

Your living room lights arenā€™t going on because of the way IF, ELSE-IF, ELSE, END-IF statements work, here and in other coding systems.

In an IF, ELSE-IF, ELSE, END-IF statement, the first true IF or ELSE-IF that it finds is the only one that gets run, it skips the rest. When the IF is false and all ELSE-IFs are false, then it will do the ELSE.

Your IF part was true, so it turned on the cabinet lights, and skipped the rest of the statements. You can see the ā€œskippedā€ statements in the log.

You would have to redo it. Keep in mind that you can have several simple conditional statements in a row, and they will all be looked at.

Something like
IF Lux is is ON then (Maybe OFF, see below)
IF its between sunrise and sunset turn on cabinets
IF its between 3PM and sunset turn on living room

ELSE
turn everything off
END-IF

In your actions, you are telling it do things if the lux vs is ON. If itā€™s Off when the light level is low, then wouldn't you want this to turn on lights when it's OFF?

You may also need one or more ā€œtime isā€ triggers along with the lux vs. For example if LUX is off before 3 pm, when it gets to 3 pm the living room lights wonā€™t turn on unless you also have a ā€œtime is 3 pmā€ trigger to make it look at the rule at that time. May need that at the beginning of the day too, if itā€™s a real gloomy day and the lux vs stays off.