I see two problems - one real small and the other one is a big problem.
First, you are setting up a delayed action to turn the light off just before the repeat. But since the first part of the the IF statement matches the triggers, it will always do that part of the IF statement on any trigger. And that cancels the delayed action and starts a new one. So that first delayed action before the repeat is only going to exist for a few milliseconds before it is cancelled, so you can remove that line.
The bigger problem is what happens when you get multiple triggers.
When rule machine gets to a repeat, it runs the repeat actions, exits the rule, and sets up a scheduled job that will restart the rule back at the repeat line. In your rule, that will happen every 30 seconds, until it is stopped.
However, while the delay is going, any trigger, such as the motion sensor or a door opening, will start the rule up again from the top, more or less a second copy or the rule. And that will end up starting a second repeat loop. That will happen any time you have the sensor being activated and a door opening, in either order. If another door is opened, you will get another repeat running.
Not only is that using up more hub resources, it can cause unexpected results and sometimes cause an error.
The general way to prevent that is to use a variable to make the rule exit if it gets triggered again while it is already doing a repeat.
Create a boolean variable, and set it to true. You could use a local variable for this.
Just before you start the repeat, set the variable to False.
Just after the Stop Repeating Actions, set the variable back to True.
Then add a line at the very beginning that exits the rule if the variable is False.
That should stop it from creating more than one repeat at a time.
A repeat is needed to make something happen repeatedly such as sending a message every 5 minutes or flashing a light on and off every 3 seconds. But if you are just waiting for certain conditions, there are lots of ways to do this without a repeat loop at all, and that will use even less system resources.
Instead of a repeat, use triggers to only run the rule any time something changes.
Change your triggers to motion sensor changed and any door sensor changed.
Triggers
motion sensor changed
OR
any door sensor changed
Actions
IF motion sensor active OR any door sensor is open then
On: lights
Cancel Delayed Actions
ELSE
Off: lights —-> delayed 0:10:00 (cancellable)
END-IF
That rule will run anytime the sensor goes active or inactive or a door opens or closes. With the motion active or any door open right after a trigger, it will turn on the lights and cancel any delayed action so the lights stay on.
If the sensor is inactive and all doors are closed, it will then start the delayed action to turn off the lights.
You don’t need to do anything if the light is turned off manually, since there is no repeat to be stopped. Eventually the rule will end up sending another off command, no big deal.