I’m reading about the settings for Items with to correct type.
I’m using node-Red to make calculations and trying to find out the best method here.
At this moment I have for example the power concumption set as type Number.
With state description I set the value to %.0f W
In Node-Red I can easily make a calculation with the number value, for example multiply wtih 1000.
When chaning the type to number:power, Node-Red can’t handle it as a number anymore and getting a NaN result.
I tried the Change node with expression $number(payload) and also a function with different options, like Number() of ParseInt(), but giving also a NaN result.
I expect some work to add something for the conversions, I know I can make a function to strip all Alphanumeric characters and than convert to a number.
But I hope there is a more easy way for this.
I’m relative new to Node-Red, but converted almost every rule to Node-Red already.