Using "increased by over" in IF condition

I'm trying to use an "increased by over" condition in an IF conditional action but it doesn't seem to be working as I thought it would.

I've created a simplified rule as an example rule so I know the trigger here could be changed to avoid the IF altogether. It just uses a global variable for the value being increased over.

Not sure if this is relevant info, but before the rule is run:
image

and after I manually change the global number variable from 0 to 1:
image

The log only shows entering the rule, but not the IF actions being run:
image

Couldn't find anything on this being a known issue(2.3.5.152), so any help with what I'm doing wrong or confirming this should work would be much appreciated.

Darrell

I think the increased by over is meant to be used in a trigger, not in a conditional action. At the time of the condition, the value is not increasing at all, it remains the same.

1 Like

The trigger conditions are separate from the managed conditions used in actions that use conditions, so maybe allowing "increased by over" as a choice for managed conditions was a UI mistake?

It seems like this could work as long as the prevState info is not updated until the rule exits. I guess the present value used for comparison could still be fluctuating while the rule executes depending on the device/variable being used in the condition and delays in the rule itself.

For my purpose I can just save previous state values in local variables to use in the conditional statements in order to make it work the way I would like.

I'm still unsure whether the issue here is allowing me to choose "increased by over" as a condition or how the prevState info is being updated/used in the condition I created in the example in my first post.

I think @bravenel would know. I think he implemented the « increased by over » at my request (and I do use it, thanks again, it’s very useful to detect fast increases and differentiate from minor fluctuation). My use case was strictly for triggers though, not for in-rule conditions.

This is definitely a UI bug. "increased by over" should only be available for a trigger, and not any condition. Will get that fixed... None of the increased, decreased, etc comparisons make any sense in a condition. A condition is evaluated statically, as to the present state only.

2 Likes

@bravenel, Thanks for the clarification.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.