Question on automation modes

I have an automation that is triggered by a humidity change.
There is then a condition to check if the humidity is above or below a certain level.
If it is above, then it turns on an extractor fan, waits for 5 minutes, then turns it off.

Its mode is set to restart, meaning that on the next humidity change, if thats within 5 minutes, it kills the previous automation run and starts again.

If the humidity remains high, the 5 minute wait is effectively refreshed and the fan stays on.

However, I’m not clear what happens if the condition is not met.

Does mode: restart mean that the previous automation, if still running, is ALWAYS stopped, even if the next run does not actually initiate any actions because the condition is not met ?

Or, is the previous run only stopped if the next run meets its run condition ?

The reason I am unsure is because the screen shot here:-

Shows how actions are effected, not triggers and conditions.

Effectively the mode isn’t relevant until after the trigger and condition blocks are evaluated.

Correct

Thanks for your quick reply.!