You could place a 'Slider' widget on your dashboard and send the slider-value to 'context' flow-variable.
Then in your function node you could 'get' the flow-variable from 'context' and use it in your 'if-else' construct.
[{"id":"c85ddfd9b2124e4a","type":"tab","label":"Flow 37","disabled":false,"info":"","env":[]},{"id":"621917ccd2dff99f","type":"ui_slider","z":"c85ddfd9b2124e4a","name":"","label":"Humidity","tooltip":"","group":"4045eb716a4077f5","order":0,"width":"1","height":"6","passthru":true,"outs":"end","topic":"topic","topicType":"msg","min":0,"max":"100","step":1,"className":"","x":270,"y":200,"wires":[["6f7acfa33ad6d7ee"]]},{"id":"6f7acfa33ad6d7ee","type":"change","z":"c85ddfd9b2124e4a","name":"","rules":[{"t":"set","p":"humidity","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":200,"wires":[[]]},{"id":"4045eb716a4077f5","type":"ui_group","name":"Default","tab":"bf43de97.2470a8","order":5,"disp":true,"width":"6","collapse":false,"className":""},{"id":"bf43de97.2470a8","type":"ui_tab","name":"Owntracks","icon":"dashboard","order":1}]
Note: I've shown the orientation of the slider as vertical, you can alter it to horizontal (to save space).