I did some more testing and found another strange configuration: what happens if the from value is less than the to value? I would expect an invalid node error or something. That's not the case and instead I can do something like this:
[{"id":"1ae5ab0fcaa82ddc","type":"group","z":"ccbf1eb483af3580","name":"limit to target range","style":{"label":true},"nodes":["16f237028e823fb8","6cbcee09b67d8279","bebdc09f44bef0d8","170f49712b8a82f6","a038e05f5cd72970","c16cdfde2b1b9eee","c6cbc0c6a054e9c6","184f031e24c22762","ae4b874bbd4c74d5","e9b4f4a4eac991fb","5b0d291ac537e80e","8581e538618eb3c8"],"x":57,"y":66,"w":697,"h":268},{"id":"16f237028e823fb8","type":"range","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","minin":"100","maxin":"0","minout":"0","maxout":"-100","action":"clamp","round":false,"property":"payload","name":"","x":380,"y":107,"wires":[["bebdc09f44bef0d8"]]},{"id":"6cbcee09b67d8279","type":"inject","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"40","payloadType":"num","x":161,"y":107,"wires":[["16f237028e823fb8"]]},{"id":"bebdc09f44bef0d8","type":"ut-assert-values","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"-100","tot":"num"}],"x":608,"y":107,"wires":[[]]},{"id":"170f49712b8a82f6","type":"range","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","minin":"100","maxin":"0","minout":"0","maxout":"-100","action":"clamp","round":false,"property":"payload","name":"","x":378,"y":173,"wires":[["c16cdfde2b1b9eee"]]},{"id":"a038e05f5cd72970","type":"inject","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-40","payloadType":"num","x":159,"y":173,"wires":[["170f49712b8a82f6"]]},{"id":"c16cdfde2b1b9eee","type":"ut-assert-values","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"-100","tot":"num"}],"x":606,"y":173,"wires":[[]]},{"id":"c6cbc0c6a054e9c6","type":"range","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","minin":"100","maxin":"0","minout":"0","maxout":"-100","action":"clamp","round":false,"property":"payload","name":"","x":372,"y":237,"wires":[["ae4b874bbd4c74d5"]]},{"id":"184f031e24c22762","type":"inject","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-20","payloadType":"num","x":153,"y":237,"wires":[["c6cbc0c6a054e9c6"]]},{"id":"ae4b874bbd4c74d5","type":"ut-assert-values","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"-100","tot":"num"}],"x":600,"y":237,"wires":[[]]},{"id":"e9b4f4a4eac991fb","type":"range","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","minin":"100","maxin":"0","minout":"0","maxout":"-100","action":"clamp","round":false,"property":"payload","name":"","x":374,"y":293,"wires":[["8581e538618eb3c8"]]},{"id":"5b0d291ac537e80e","type":"inject","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20","payloadType":"num","x":155,"y":293,"wires":[["e9b4f4a4eac991fb"]]},{"id":"8581e538618eb3c8","type":"ut-assert-values","z":"ccbf1eb483af3580","g":"1ae5ab0fcaa82ddc","name":"","ignore_failure_if_succeed":false,"rules":[{"t":"eql","p":"payload","pt":"msg","to":"-100","tot":"num"}],"x":602,"y":293,"wires":[[]]}]
The configuration of the range node is this:
Regardless of payload (at least those that I tried) the range node always gives me -100 - is that correct? For example, 20 should map to -20. Or 40 to -40. -20 and -40 are correct in being mapped to -100 being outside the input range.