Another solution, this one obviously will contain silicon Pixies, as they are off Xmas duties. It also forces out of range numbers to min and max (0, 10), it shloud also reject strings unless "0" - "10".
[{"id":"be451ec43efa387e","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":150,"y":1800,"wires":[["35ceb9c1e232bb1d"]]},{"id":"35ceb9c1e232bb1d","type":"range","z":"da8a6ef0b3c9a5c8","minin":"0","maxin":"10","minout":"0","maxout":"10","action":"clamp","round":true,"property":"payload","name":"","x":310,"y":1900,"wires":[["0dde7af39bb21306"]]},{"id":"e1e8d7cc1dc239af","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":150,"y":1920,"wires":[["35ceb9c1e232bb1d"]]},{"id":"f823969bdae166b3","type":"inject","z":"da8a6ef0b3c9a5c8","name":"2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":150,"y":1880,"wires":[["35ceb9c1e232bb1d"]]},{"id":"06f4c0dfcf3869b0","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":150,"y":2000,"wires":[["35ceb9c1e232bb1d"]]},{"id":"b906141c19e3a477","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"9","payloadType":"num","x":150,"y":1960,"wires":[["35ceb9c1e232bb1d"]]},{"id":"c65bc84b78187b7a","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"uyuu11","payloadType":"str","x":150,"y":2040,"wires":[["35ceb9c1e232bb1d"]]},{"id":"573ea6deac1f4df4","type":"inject","z":"da8a6ef0b3c9a5c8","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":150,"y":1840,"wires":[["35ceb9c1e232bb1d"]]},{"id":"0dde7af39bb21306","type":"change","z":"da8a6ef0b3c9a5c8","name":"","rules":[{"t":"set","p":"position","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"(\t $steps := $$.position - $sum([$flowContext(\"old_position\")]);\t $bool := $steps >= 0 ? true : false;\t ([1,1,1,1,1,1,1,1,1,1][[0..($abs($steps)-1)]]).($bool)[]\t)","tot":"jsonata"},{"t":"set","p":"old_position","pt":"flow","to":"position","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":1900,"wires":[["8c268a4bc25b31e7","7cd9321974e09a3a"]]},{"id":"8c268a4bc25b31e7","type":"split","z":"da8a6ef0b3c9a5c8","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":610,"y":1900,"wires":[["f608bdd6c5e18b38"]]},{"id":"7cd9321974e09a3a","type":"debug","z":"da8a6ef0b3c9a5c8","name":"debug 221","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"position","targetType":"msg","statusVal":"postion","statusType":"auto","x":610,"y":1840,"wires":[]},{"id":"f608bdd6c5e18b38","type":"delay","z":"da8a6ef0b3c9a5c8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"10","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":760,"y":1900,"wires":[["4dfb3005f7869f53"]]},{"id":"4dfb3005f7869f53","type":"debug","z":"da8a6ef0b3c9a5c8","name":"debug 220","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":1980,"wires":[]}]