[Released] Rule 4.0

OK. That's odd then that @toy4rick got a malformed error and you didn't. That also doesn't make sense to look at things like that compare to what we had before with RM, where the repeat was always shown after the action is was repeating.

I'll do it the way it needs to be done. Thanks for pointing out the error. Just doesn't make it easy to learn completely different ways to doing things.

I think I've found the issue, it was related to the fact that I added a "Repeat action" before ELSE IF but I haven't closed it with the proper "End repetition".

I think it should be in some way disallowed to add an "ELSE IF" inside a repeat action, it should start with an "IF", shouldn't it?

The major difference with the formatting is that I inserted the End Repetition.
If you don't do that and just insert the END-IF it will be malformed. I like to keep things tidy :slight_smile:

As far as I am aware, the Repeat Actions always had to come before the actions to be repeated, even with RM3. I don't really use it that much though, so I can always be wrong too...

Technically, you are correct, it shouldn't be possible. I am pretty sure it is not that easy as you can start a new IF within the repeat actions which could have an ELSE-IF. I think these are side effects of allowing nested IF-THEN-ELSE. Makes it much more complicated in regard to what is allowed and what isn't....

No it's a little different, or at least shown differently in RM 3. You're not wrong that there should be end repetition and I noted that

There also was not repetition limit entered, and that would change things too.

@bravenel - just a general thank you for this - I just rewrote a super complex rule that was previously spread across 7 individual rules and actions. Much easier to see what is going on now - and much easier to implement... Rule machine has come a long way!

@bravenel One question - will a rule wait for a change indefinitely .. or will it time out eventually?

They wait indefinitely. However, there is way to cancel them after time X. Here is what you can do:

You can add a "Cancel Wait" with a delay before you start your wait. It has to be before the wait though! In my example, the wait would be canceled after 10 minutes or when the event occurs that I am waiting for

I really appreciate these changes. It makes things much easier for those already trained to think like programmers! (Whether we do that stuff much or not.)

One minor change I would like to see however is improved resolution on the periodic scheduling with user definable periods built into it. E.g., I want to time something to 45 minutes, but it stops at 30 for the maximum with the next option being hourly. I assume other workarounds exist, but I admit that I am lazy and don't want to figure it out.

You left of the End Repetition. It could tell you had a Repetition inside an IF-THEN block, and caught your mistake.

You need to delete that action and redo it.

The way you present that is very confusing, and evidently malformed. Your indentation is off, so I can't tell what you're trying to do.

You can't select All motion sensors for a trigger event. If you want it to trigger on any of your motion sensors, then select all of your motion sensors. The concept of ALL is incompatible with a trigger event (what, are all of them going to fire at the same instant?). ANY and ALL apply to conditions, not events.

I can confirm there is a bug with Capture. Will investigate that.

You would have to show actual screenshots, not things you have typed in.

There is not an action that does this.

You should. You too have a malformed repeat, with no End Repetition.

1 Like

This was not the case with 3.0. It's always been

Repeat
     Actions
End Repetition

That's why you get a Malformed Repeat error.

It will wait indefinitely. However, if the rule is triggered again, that ends it. Also, you can add an Elapsed Time event to the Wait to force a timeout. And you can end it from another rule with Stop Rule Actions, etc.