I’m having some issues performing calculations on device values. Could somebody please take a look and tell me what I’m doing wrong, it seems like I’m getting data type mismatches. Can’t find much documentation on data types of device values.
This is just groovy stuff, unless otherwise specified, everything ST is a string value.
Sometimes the strings evaluate to ints on their own, sometimes they don’t, I know it’s not Magic, and I also know I don’t know Groovy well enough to tell you where/when/why you have to do it one way or another.
All I can tell you is that when I get errors evaluating numbers, casting them to integers (or whatever you need) eliminates the type errors