I have found no mention on how to evaluate the state of an item that would be NULL or UNDEF.
Would someone has a pointer or should I compare it directly as a string ?
Which version of OH?
In either case, if this is the Item that triggers the rule and you don’t want to do anything if it’s UNDEF or NULL, add a couple of conditions to the rule for that case.
In OH 3.4 I’d do something like
I’m not positive that the “append to text” stuff is necessary to turn the state of the Item into a String or not.
In OH 4 it’s definitely not required since the state of the Item is already going to be a String.
There is also an attribute on the Item called .uninitialized
which you would call in an inline script block. But the 3.4 version should work in OH 4 too.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.