I think I'm either going nuts or I'm missing something obvious. I have a relay board that returns a string 0 or 1 based on the relay state. I'm trying to convert the "int" to on/off and pass it as the payload to a switch.
For some reason I can't get the function node to convert this correctly.
Function Node:
Output from the exec node that is passed to the function node above:
Hard to tell with those screen shots & without seeing the whole flow i can only guess. Perhaps msg.payload has a newline or other non printable character in it? - meaning msg.payload != "0"