Hi There,
Just a quick heads up - the range node can be brought to generating values outside of the configured bounds:
[
{
"id": "9b95f8806d032b1a",
"type": "inject",
"z": "ae38b2dbd23d1681",
"g": "b4012d193105c803",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "13.1",
"payloadType": "num",
"x": 627,
"y": 1175,
"wires": [
[
"9867b9610c1786d5"
]
]
},
{
"id": "9867b9610c1786d5",
"type": "range",
"z": "ae38b2dbd23d1681",
"g": "b4012d193105c803",
"minin": "0",
"maxin": "9.5",
"minout": "0",
"maxout": "100.5",
"action": "clamp",
"round": true,
"property": "payload",
"name": "",
"x": 954,
"y": 1175,
"wires": [
[
"4fbf1055ffadffe5"
]
]
}
]
Range node is configured to target range of 0 - 100.5 and the value 13.1 is outside of the incoming range of 0 - 9.5, range node is configured to "limit to the target range".
This example will give a value of 101 because I also set the "round result to the nearest integer".
But the value should really be 100 since that's within the target range.