Stop a rule

Hello there

I have this rule running in Rule machine

(The black outlined will be explained.)
which is doing what I want it to, starting my outdoor bulbs low and in white, rasing the level higher and making it more yellow, so far so good.
I guess you can tell what the danish words means, or please ask.
But, I can not stop it again, as soon as "niveau for tænding af lys" (level for turn on lights) fires the rule runs. If for some reason I want the light off (bedtime, gone away), I can turn them off, but when the delay is done, they turn on again, meaning, I can not stop the rule from executing.

Then i looked and created this:


But will it work, I know that I have to program some more steps.
What happens if "niveau for tænding af lys" goes off state and then later in on state, where will it start, from the beginning or where it stopped.
Or will there be a better way to achieve this.

Please ask, if I am unclear.

Greatings from Denmark

If you want to stop this chain of actions, you'll need to run "Cancel Timed Actions" on this rule, probably most easily done from another rule if you have a way to "trigger" that. (You could also do it from the same rule, but there probably isn't a good way to fit that in.) You will also likely want to either mark all of these delays as "cancelable" and add a "Cancel Delayed Actions" first thing in the rule so that the existing scheduled job gets erased if/when the rule gets re-triggered, or you could use "Wait for events: elapsed time" instead, which is probably what I'd suggest (less clicking, and they are automatically cancelled on re-trigger).

You could also find some way in your rule to test things on your own. For example, maybe before each set of the color temperature:

IF (Light is off) Exit Rule

Then, no further actions after that one will be run.

There are also other ways that this automation could be handled, but I'm not sure if that would really be easier. One of these is creating two scenes and using a Scene Transition, which can do this math for you and allow stopping the transition with a switch. But that seems like basically what you can do here with one of the solutions I mentioned above.

Thanks a lot
I will look at it in the weekend, I think this is what I am looking for

Just what I looked for, works fantastic.
Thanks.

Download the Hubitat app