Design Pattern: Proxy Item

Without seeing your code I can’t say for sure, but it sounds like you are either triggering the rule only when the light turns ON or you are only setting the override flag when the light turns ON.

You should set the override for ANY change in the light’s state (or really any update the to the light that occurs after the motion sensor stops reporting.

If you look at my Time based example, you will see I do something a little similar in that I only care about the Override at a certain Time of Day. And personally, I would probably set yours up this way because I wouldn’t want to require someone to turn off the light manually before bed to make sure the motion sensor doesn’t turn it back on.

But if you are OK with that behavior, I think the issue is in your rule as I already stated.