Repeat While continued after one of the while conditions became false

So I have this rule and thought I had it working BUT it didn't stop today when it should have.

The switch "V-tea Ready" makes Alexa tell me my tea is ready. When I physically have put it in thr fridge I tell Alexa "I have my tea" and the V-Tea Complete switch is turned on. It did turn on but if you look at the log it just started another repeat without looking at the conditions of the While. The rule pasted here shows true as it did actually reset after it ran for the full 3 times but it should have stopped after 2.

Is this a bug?

1 Like

Do you have the time when V-Tea Complete was turned on?

Looks like 12:35:36

So if any of the statements become false it will still finish? Really? I assumed it would not do the next iteration and end the repeat then.

Looks like it was on for 1 minute before the next loop tested.

1 Like

Keep in mind the trick here is for the V-Tea Ready to trigger Alexa to tell me 20 minutes after the first time after the tea finishes brewing and then every 10ish minutes for a total iteration of 3x. Then it just exits. I'd love to see it simpler! Going to test the actions again. I swear when I tested last time it worked. I don't get why in the log the While command didn't appear before the last iteration. Something seems wrong about that no matter what's up with the rule logic.

1 Like

Interesting. I made this simple while loop.

If I turn off the virtal switch between loops 1 and 2 the while stops.

If I turn off the virtual switch between loops 2 and 3 it keeps running.

I'm calling bug on this one.

Edit adding virtual switch events for completeness

2 Likes

Interesting. Running one test run right now. I shortened the times for testing purposes. If I can replicate again I'll tag someone.

Yup it repeated after I turned the second virtual switch on same rule as above with just shortened times for testing purposes the V-Tea Complete was turned on at 1:58:38.157 PM. But it still did one more pass, the 3rd.

@bravenel think we found a bug here.

1 Like

Thanks for the separate test!

2 Likes

Evidently it isn't doing the While Expression test on the last iteration. That is clearly a bug.

This will be fixed in the next release.

3 Likes

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