

I am having trouble with my expression not going true even though both conditions are right for it to be. The screenshots were taken at 1:27 but the tag is false right now. Any help would be appreciated!
I am having trouble with my expression not going true even though both conditions are right for it to be. The screenshots were taken at 1:27 but the tag is false right now. Any help would be appreciated!
I can see two possible problems.
First, the &&
has a higher precedence than the = False
, so your expression is evaluating incorrectly, I'm pretty sure.
Second, you don't have a poll rate on now()
, so your expression isn't re-evaluating during downtime.
I would rewrite it like this:
!{IsAvailableTag} && minutesBetween({uptimeTag}, now(60000)) > 5
Note that there's zero reason to include an if(condition, True, False)
- you can just write your condition out, and it'll automatically return a boolean result (or be adapted to a boolean by whatever context is running the expression).
Thank you so much and I did not know that I the if statement was not needed. I appreciate it!
Tip: post formatted code instead of or as well as the screengrab so we can copy, test and edit it. Please see Wiki - how to post code on this forum. Also, you can break lines in expressions and use indentation to make them more readable. The interpreter ignores line breaks, tabs and multiple spaces.