Room lighting not turning off light when day changes

I have a Room Lighting rule set up to use a motion sensor as a trigger
The rule uses modes to set various brightness level throughout the day and evening.

I've added two more modes (Morning and Overnite) for further control.
If the cats trigger the sensor during Overnite, the light doesn't come on.

The rule is set to turn the light off after 5 minutes.

This rule works great except when the rule is triggered just before midnight.

For example, if the motion sensor triggers at 11:59 PM the light will not shut off at 12:04 AM

Has anyone seen this problem?
If so, how did you fix it?

I'm currently at the office so can't get screenshots of the rules.

I think this is what you'll need to troubleshoot the problem.

But a guess without that: sounds like you might have a restriction for "Means to turn off" that you intend to only have for "Means to activate," specifically, one based on time or mode.

Here's the rule I have set up.

Log Entry for last night:

app:718 2023-07-11 11:59:29.967 PM info All motion inactive, scheduling off in 5 minutes
app:718 2023-07-11 11:59:29.956 PM info Turn Off Event: 'Downstairs Motion Sensor' motion inactive
app:718 2023-07-11 11:58:57.650 PM info setLevel: Downstairs Light, level: 30
app:718 2023-07-11 11:58:57.554 PM info Activating for Night
app:718 2023-07-11 11:58:57.523 PM info Activation Event: 'Downstairs Motion Sensor' motion active

Device Log for the smart bulb:

The Turn off entry is because I got up and manually turned off the light with the app.

dev:733 2023-07-12 12:07:06.844 AM info Downstairs Light was turned off
dev:733 2023-07-11 11:58:57.731 PM info Downstairs Light was turned on

Interesting...I might be missing something, but I don't see anything that should cause that problem. You might want to try re-creating this automation just to see if that helps (shouldn't matter, but maybe if it was configured differently in the past and something unintended got "stuck"?). Otherwise, maybe one for Bruce to look at.

I recreated the RL rule from scratch, and it's working as expected.

Something must have gotten messed up when I created it originally.

The rule didn't work as expected last night.

The rule, and a similar one in my office, were both showing (Active) on the RL screen, even though motion had stopped.
I had to press the Turn Off button in both rules to turn the lights off.

I've created a new rule to turn the light off at 12:10 AM, so I don't have to get out of bed and turn it off manually.