V7.5 Tag Read Value

I just updated to v7.5 and changed several scripts with “system.tag.getTagValue” function to the new “system.tag.read” function. Apparently, these functions are not directly interchangeable because the TagValue (with implied “.value” property) returned does not appear to play well with other functions (such as type casting, string functions, etc.). If the TagValue.value property returned is used explicitly, it seems to work OK.

Is this a known issue? Didn’t see it mentioned anywhere. Thanks.

This isn’t strictly an ‘issue’

You were too eager to switch from getTagValue() to read() you’re right: they’re not interchangeable, nor were they meant to be.

getTagValue() will continue to work, forever. We just removed it from the docs to encourage new scripts to be written with the more consistent read() function.

Like you said, to switch from getTagValue() to read() you’ll need to do read(path).value

Pardon me. What I misunderstood was that this function always returns an object. Per the manual:

“Reads the value of the tag at the given tag path. Returns a qualified value object. You can read the value, quality, and timestamp from this object. If the tag path does not specify a tag property, then the Value property is assumed.”

I confused the Value property of the tag path with the Value property of the returned object.