Predicates - WTF?

Am I incorrect in understanding that in Rule Machine, Predicates that use dates are suppose to trigger rules only within those dates?

Because I'm pretty sure that's not happening. I have several rules preceded by predicates with dates that are for the purpose of having different kinds of holiday lighting throughout the year. So when the date goes past the range for a certain rule's predicate, that particular rule is supposed to stop firing.

Except that this is not what is happening.

Is anyone else having this problem? Screenshot of suspected problem rule below - please send me your insights:

Can you post logs for this rule?

What Hub version are you on?
The release notes for 2.3.0 show:

  • Fixed Between Two Dates as Predicate condition.
4 Likes

Does the upper left of your rule show "predicate false" ?

1 Like

Yes it shows Predicate false.

I'm on Hub version 2.3.0.113

I'll set it up to do logging and get back to you.

Oddly enough, there are other rules that don't say "predicate false" in the top left, but when you go to edit the rule, it says that the predicate is false next to the predicate dates.

Your first screen shot above was not from a 2.3.0 rule, as the wording was changed from 'Predicate rule' to 'Required Expression', as in your last post just above. Given that and what @Brandon points out from the release notes, you probably got hit by that bug in the first case.

Do post logs if it still misbehaves now.

2 Likes

Wouldn't the rules automatically upgrade to the latest version when updating Hubitat?

If not, then that would imply I have to simply remake all the rules made with the older version?

If it was a Rule 5.1, it will show 'Required Expression'. And, if it's a Rule 5.0, it will still be 'Predicate rule'. Which is it?

You can tell from the Apps list page, right column.

The first one I used shows Predicate Rule, and that was one of the first ones I created in Rule Machine. And now that you mention, it's showing rule 5.0. So... I guess the answer to my question is that old rules made with older versions don't upgrade, so I should just remake that rule?

I'm not sure if the bug fix was applied to 5.0 or not, but will look into it. So yeah, if you can convert to Rule 5.1, it should work.

1 Like

Ahh, now this is making sense. OK, quick dumb question - is there a quick way to convert a 5.0 rule to 5.1 or do I just have to remake it manually?

No, you just have to do it manually.

1 Like

Doh! OK, thank you, that clears things up tremendously.

1 Like