RM 5 Private Boolean as Predicate ignored

@bravenel

Looks like using a private boolean state as a predicate isn't working in the latest couple of builds. I have tried rebuilding the rule from scratch with the same results, predicate UI shows the state correctly but the rule triggers either way and the UI doesn't reflect predicate false when it should be. I changed the predicate to a variable connector at it works as expected so it appears to be specific to a private boolean state.

I will look into it.

Yeah, it was ignoring Predicate Conditions completely. Fix will be coming...

1 Like

Seems to be specific to private booleans only?

It's how PBs are handled when another rule sets them (ignoring Predicate, and not setting it). Not sure what to do about the situation where PB is a Predicate Condition, and the rule itself sets it causing the Predicate to become false. That case is not handled as something that would trigger the Predicate Conditions to be evaluated. That's an oddball case. I assume your case was another rule setting PB?

Actually no, I was using it as a "debounce" to prevent the rule from triggering until the PB became true again (set by a delayed action withing the same rule).

I just created a local variable connector to handle this and now it works fine, but it probably should work with the PB the way I'm using it?

Once the Predicate Becomes false, the rule won't run, so how could that possibly work?

In my example, if the predicate is true and the door is opened the rule fires and sets the boolean false until 1 minute after the door is closed allowing it to fire again. A change in predicate condition shouldn't prevent the already active actions from finishing, should it?

2 Likes

No, just prevents the rule from being triggered. So in your case, once you set it to false the rule will never be triggered again unless some other rule sets PB to true. Oh, I see, yeah, that could work since the delay will run irrespective of Predicate.

So once the fix is out this rule should work?

@bravenel, it seems this issue with private booleans being ignored as predicate conditions has returned in the latest hotfix?

Not that I'm aware of. I will test it again.

Yeah, there's an issue. Will look into it.

Well, that one is sort of gnarly, but got it sorted.

4 Likes