I’m almost certain that numbers below 10 are being formatted with a space, probably where then tens digit would go.
In the place you have default
in your MQTT item binding for subscribing (<
), change it to JS(trim.js)
. Install the JavaScript transform if you haven’t already. Put the following in transform/trim.js
:
(function(num){
return num.trim();
})(input)