here is the flow:
[{"id":"6df7d1a7.4cd9c","type":"function","z":"cfbb6e4f.6526a","name":"","func":"const absMax = 99; //hard coded safe guard\nconst absMin = 10; //hard coded safe guard\nmsg.max = flow.get(\"min\") || absMax;\nmsg.min = flow.get(\"max\") || absMin;\nmsg.inputValue = msg.payload; //keep a record of original payload - good for debugging!\n\nif(msg.inputValue >= msg.max){\n msg.payload = \"Too high\";}\nelse if(msg.inputValue < msg.min){\n msg.payload = \"Too low\";\n} else {\n return null; //dont fire function node output!\n}\nreturn msg;","outputs":1,"noerr":0,"x":450,"y":500,"wires":[["6dabc296.3525bc"]]},{"id":"6dabc296.3525bc","type":"debug","z":"cfbb6e4f.6526a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":670,"y":500,"wires":[]},{"id":"e93936eb.80cb48","type":"inject","z":"cfbb6e4f.6526a","name":"","topic":"inputValue","payload":"5","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":440,"wires":[["6df7d1a7.4cd9c"]]},{"id":"5b1d03a.6b0fafc","type":"inject","z":"cfbb6e4f.6526a","name":"","topic":"inputValue","payload":"50","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":560,"wires":[["6df7d1a7.4cd9c"]]},{"id":"1e758b47.efc845","type":"ui_form","z":"cfbb6e4f.6526a","name":"","label":"","group":"91cc4ff3.10673","order":2,"width":0,"height":0,"options":[{"label":"Maximum","value":"flow.max","type":"text","required":true,"rows":null},{"label":"Minimum","value":"flow.min","type":"text","required":false,"rows":null}],"formValue":{"flow.max":"","flow.min":""},"payload":"","submit":"submit","cancel":"cancel","topic":"","x":250,"y":500,"wires":[["6df7d1a7.4cd9c"]]},{"id":"91cc4ff3.10673","type":"ui_group","z":"","name":"Botão Relé 1","tab":"8f89f7a7.c74cf8","disp":true,"width":"6","collapse":false},{"id":"8f89f7a7.c74cf8","type":"ui_tab","z":"","name":"Relés","icon":"dashboard","disabled":false,"hidden":false}]