[Released] Rule 4.0

I still have some too. On the advice of the master, I simply don't fix what isn't broken. Have to admit to being a bit apprehensive, despite understanding the conditional logic introduced in RM 3.0

As it turns out, it's not really difficult to wrap your head around at all. It just takes some adjustment away from old habits. I converted a few multi-rules into a single 4.0 rule and it all went well. I found a few just didn't make the situation any better to convert them, and some are just single conditions/actions that just would make no sense to spend my time converting.

I'm sure I'm going to screw up a few where I needed private boolean but didn't include it, but that's just part of learning.

Is this a bug? I created a rule, and it just had that first if-then-endif statement. Then I went back to modify it to add a couple of more doors, and that second IF statement appeared and I can't get rid of it without deleting the whole rule.

Hit Done with Conditional Action, and then you can delete that action.

There is a UI anomaly that I need to fix. See this:

In this circumstance, if you were to click on Done with Conditional Action before clicking on Done with Condition, it would leave the rule in a weird incomplete state. If you then open the actions again, it will likely misbehave.

The fix for this is that lower row of buttons should not be available until after Done with this Condition is clicked on. I can't be sure this is what happened to you, but it could be something like this.

Oh...That's The Manual I should have read :wink:

There's some weird editing stuff also. I have no friggin' idea how to fix this without starting over:

I want to insert something right after that AND operator, but I cannot seem to figure out how to do it.

@bravenel

I was trying to add a new conditional actions event to ensure my push notification happens every 10 mins until the contact is closed and get this error

It happened immediately after I added a Repeat every 10 mins after my If-Then

What am I doing wrong?
Rick

You want repeat after your notification. You can't repeat the time being between sunset and 5:30 AM

1 Like

It looks like you didn't complete your condition or backed out before adding one. If you go back in and edit that condition to add something, then you can delete it.

I'm trying to get a push if the garage door is open between sunset and 5:30am and repeat every 10 mins until it's closed

Same thing as requested by @didymus

I tried moving the repeat to after the notify and get the same error

Ricki

Bruce,

Is it possible for multiple lines of (separate and not conflicting) IF statements to be true and run simultaneously?

IF condition 1  (TRUE)
   IF sub-condition 1.1 (TRUE)
   THEN do action 1.1
   ELSE do action 1.2
   END-IF
IF condition 2 (FALSE)
   IF sub-condition 2.1 (TRUE)
   THEN do action 2.1 
   END-IF
IF condition 3 (TRUE)
   THEN do action 3.1
   ELSE do action 3.2
   END-IF

Will actions 1.1 and 3.1 be run by the rule, if the rule is triggered in some manner?

Edit: For anyone wondering, it will run multiple complex IF statements.

Bruce,

A request. Is it possible to have logging levels modified slightly? At present, it seems to be all or nothing (despite the 3 logging options). With Rule 4 (great job btw), it seems that we will be having larger and more complex rules. And I want logging only if there is a change. There is a LOT of skipped in the logs with logging enabled! A lot.

What I'd like is for anything that is skipped to not log, but for anything that is actioned/done to be logged. I tried actions but it includes skipped actions as well, and when I disabled actions, there was only the trigger in the logs. I thought events might work, but I dont think that logged anything in my particular rule.

Hi Bruce,
I'm converting (and consolidating into single rule) some RM 3.0 rules, but I noticed a strange thing, consider for example this case:

IF condition THEN
    action2
ELSE IF consition THEN
    action2
END IF

In Hubitat it's shown as

IF condition THEN
    action2
    ELSE IF consition THEN
        action2
END IF

Do I need instead to ADD END IF also before the ELSE? It shouldn't be needed because ELSE it's still related to the initial IF, isn't it?

IF condition THEN
    action2
END IF
ELSE IF consition THEN
        action2
END IF

Still don’t know how to select all motion sensors instead of any.

@bravenel

Trying to set one dimmer to the colour of another dimmer. How to do that in Rule 4?

Also, in attempting to do that, I found a bug. Capture device (dimmer) causes the page to crash with no "done" button to press. The device selected does not carry forward to next screen, and "cancel" is the only option.

1 Like

Try deleting your rule and starting over. I do not get the same error running platform 2.1.2.114

21%20AM

This looks like a pretty good template for many rules....

1 Like

No, you don't have to add an END IF before the ELSE-IF, it would actually break the flow.
Can you post a screenshot? Would love to see if it is "just" a visualization issue

And true that although I didn't get an error when duplicating @toy4rick 's rule, you wouldn't want to do it that way, but would rather follow @bravenel 's example. Otherwise, once the message started, there would be nothing other than pausing the rule to stop it until the time was no longer true. What you could do is have the contact be the trigger and set the time in restrictions. However, you would still want ELSE Stop Repeating actions

Your rule has a little problem...

The repeat has to come before the Speak, like this: