Sometimes my Logic is not right

Sometimes, I use the wrong Logic in my Rule Machine Conditional Actions. I would really appreciate it if someone would confirm what I am trying to do in this Rule is correct or if I am WAY off base.

I want to write a Rule that would start at 4:00PM and runs until 10:00PM.
The first thing I would like it to do is to Turn Lamp1 on Red at 100%. At the same time I would like it to Turn Lamp2 on Green at 100%.
Then wait for 30 seconds and switch the Colors between the two Lamps.
Then wait another 30 seconds and start the process all over again.

Hubitat_Logic_Rule_Machine|690x392

Will this do what I want? Thanks for your help
Bill

I'm not really familiar with the Repeat function. However as written I don't think it will ever stop.

You should also read this post Repeat and End Repeat(?)
.

I would consider using a "private Boolean" with an additional trigger at 10PM.

If time = 4:00 THEN set private Boolean to true.
end-if

If Boolean = true THEN
blinking code Repeat
end if

If time = 10:00 THE set private Boolean = false
end if

That looks good however you'd need a second trigger for 10pm and I think a few other changes like stopping repeating actions. I haven't tested this but I think this would work.

I think that would work, but I also think that logic wise he could keep the trigger only at 4pm,and put the if inside the repeat, as well as the else.
I imagine if there is a stop repeating actions inside of a repeat it might stop it. Otherwise, could also add an exit rule to the Else.

Thank You to ALL!
Sometimes as I write a Event Driven Rules, I tend to think I am writing on a Mainframe. When writing for Home Automation the logic is different.
Appreciated
Bill

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.