Change percent of lights during certain time when motion

New to Hubitat but loving it so far. I’ve got two hubs and a SmartThings linked together and am having fun with rule manager too.
But simple question I think. I’ve attached a copy of a rule that’s working perfectly, but I want to add to it so that if it isn’t between 4am and 10 pm to turn them on at 10 percent. But between 4am and 10pm 100 percent.
Thanks

Seems like thisd would be easier to do in Motion Lighting than in RM, but maybe not (?).

In any case, you would use multiple IFs, and instead of ON set the dimmer level (that will turn it ON if it isn't already, and go to the requested level %).

That’s kind of my question, where do I put the next if condition at? Before the ELSE, after the cancel delayed actions.
That’s what I would think.

I’m doing this in RM because I have a lot lot of similar rules that will control other things and I want to get used to it.

Thanks for your help.

I would re-write it and use a nested IF. Something like:

IF (hallway motion sensor active)
-----Cancel delayed actions
-----IF (Time Between 4AM and 10PM)
----------set dimmer to X%
-----ELSE
----------set dimmer to Y%
-----END IF
ELSE
-----Delayed OFF
END IF

Would this work.?

It should. I never like making time ranges that cross a day boundary, but I seem to remember Hubitat handles it correctly, so probably not an issue.

If not, then you would need to break into 3 time chunks and IF/ELSE-IF.

And yes, your way you definitely need a cancel in each IF/ELSE-IF section.

I probably would need another cancel delayed actions.

So you mean like 4:01 and 9:59 or something.

No, I mean you are trusting it to know that 10pm to 4am will work right (only match 10pm to midnight, and then midnight to 4am)... Some systems do it right and some don't.

Because technically 6pm is also between 10pm and 4am (of the same day), and that is not what you want to match.

In other words, you are trusting the system to handle the directionality of time, and not all do. That is why I say using a between range like "10pm to 4am", crossing the midnight boundary, is bad practice in general, unless you are sure that the system handles time boundary "between" style statements correctly/the way you want.

Anyway, just try it and see. Either it works, or it doesn't... If it doesn't then you change it to 00-4am, 4am-10pm, 10pm-midnight. 3 sections.

When it comes to time I usually prefer to define the zones that have finite ranges inside of the same day, and then an everything else range (ELSE). But to do that, you would really need to structure it like I did above with a nested IF.

No right or wrong way to do it. If it works, it works!