I am trying to use a numeric input to be able to adjust a timer off delay, but becuase the numeric input node only sends when changed I am trying to save the value to a varible and have a function use that varible to add it to the flow each time the timer is started, But I dont know how to do the varible part properly, here is what i have at the moment:
[{"id":"63d6e846.0e8318","type":"ui_led","z":"4f2cae6a.c5ec8","group":"a92077cf.7a28e8","order":4,"width":0,"height":0,"label":"Test","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"allowColorForValueInMessage":false,"name":"","x":750,"y":460,"wires":[]},{"id":"3ca31c67.d88c54","type":"inject","z":"4f2cae6a.c5ec8","name":"test","topic":"","payload":"1","payloadType":"num","repeat":"10","crontab":"","once":true,"onceDelay":"5","x":210,"y":460,"wires":[["304b5c38.c56534","63d6e846.0e8318","741a76e9.40e718"]]},{"id":"304b5c38.c56534","type":"change","z":"4f2cae6a.c5ec8","name":"Water off","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":540,"wires":[["3ad0e86d.368b98"]]},{"id":"3ad0e86d.368b98","type":"delay","z":"4f2cae6a.c5ec8","name":"Off Delay","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":600,"y":540,"wires":[["63d6e846.0e8318"]]},{"id":"741a76e9.40e718","type":"change","z":"4f2cae6a.c5ec8","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"delay","tot":"msg"},{"t":"set","p":"delay","pt":"msg","to":"delay_value","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":500,"wires":[["3ad0e86d.368b98","f8f972f2.0e18f"]]},{"id":"f8f972f2.0e18f","type":"debug","z":"4f2cae6a.c5ec8","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"delay","targetType":"msg","x":730,"y":380,"wires":[]},{"id":"cde19d5b.bf893","type":"ui_numeric","z":"4f2cae6a.c5ec8","name":"","label":"numeric","tooltip":"","group":"a92077cf.7a28e8","order":5,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"{{value}}","min":"1","max":10,"step":1,"x":340,"y":420,"wires":[["6eadcd45.8a6574"]]},{"id":"6eadcd45.8a6574","type":"change","z":"4f2cae6a.c5ec8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"delay_value","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":420,"wires":[[]]},{"id":"a92077cf.7a28e8","type":"ui_group","z":"","name":"dashboard","tab":"7dd97b74.960734","order":1,"disp":true,"width":"6","collapse":false},{"id":"7dd97b74.960734","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]