Repeat n times

So I have the below code. Goal is to basically continue to attempt to open my ikea shades. I have issues with them not responding to commands every time, as well as not accuractly reporting the position. As such I'm never getting kicked out of my repeat loop. Currently I try to kick out of it after 30 minutes using the current time, but its a really shitty way of doing it and looking to just have the rule repeat until conditions are satasified or number of repeats are exceeded.

My issue is if i try to tell it to repeat it repeats 10 times every loop instead of repeat the loop 10 times then exit. How do i Change that. I'm sure its simple but struggling for some reason

Not 100% sure what your saying here. Showing the log of what is happening would be very helpful to see what is going on.

It looks like it should repeat until both shades are open then stop repeating.

I'll post the logs later, but when i use the code it shows this

does this mean it will repeat every 3 minutes, for a total of 8 times, or that it will repeat 8 times every 3 minutes.

It should repeat 8 times, once every three minutes.

2 Likes

perfect thanks wording made me think it was just going to spam it

Regarding your Ikea shade problems here a a couple of trics that made mine run absolutely perfect.

Yuo must have a strong mesh, use the provided Ikea repeaters.
Only run one at a time, they have a lot to tell and a lot of data is generated.
Do a hard close every to or three days will help the stop point not to float

My current code:

But the loop is still running over 2 hours later, any idea why?

Not sure. Your log only shows a portion but from what I can see it shouldn't still be running at 9:00 am.

Here is an example of a very simple rule which does basically what your rule does. The log is below it repeats until tempnumber is > 3 and then stops When it loops it tells you how many more times it will loop.

My advice would be to create a new rule and keep it simple then start adding more stuff until you figure out what is causing your issue.