I'm trying to make a Celsius / Fahrenheit dropdown setting which then changes the gauge. I'm still learning here but I understand objects, just not necessarily JScript.
What I have now I cannot get the setting properly in the function node to use it.
This is what I have so far. The first gauge works fine reading from my temp sensor. The test one I wanted to change based on the setting.
[{"id":"514ce859.e01408","type":"tab","label":"Flow 5","disabled":false,"info":""},{"id":"e7cca8d4.2a1318","type":"debug","z":"514ce859.e01408","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":650,"y":160,"wires":[]},{"id":"6573bd44.1cf1d4","type":"function","z":"514ce859.e01408","name":"Convert C to F","func":"var tempc = msg.payload;\nvar tempSetting = msg.options;\nif (tempSetting == \"f\") {\n tempf = tempc * 9/5 + 32;\n tempf = Math.round(tempf * 10) / 10;\n msg.payload = tempf;\n}\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":100,"wires":[["85a28a0e.b61b28","e7cca8d4.2a1318"]]},{"id":"85a28a0e.b61b28","type":"ui_gauge","z":"514ce859.e01408","name":"","group":"2695801d.e533b","order":5,"width":0,"height":0,"gtype":"gage","title":"Test Gauge","label":"units","format":"{{value}}","min":0,"max":"120","colors":["#00b500","#e6e600","#ca3838"],"seg1":"34","seg2":"70","x":670,"y":100,"wires":[]},{"id":"4523fb4c.a05494","type":"change","z":"514ce859.e01408","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":100,"wires":[["6573bd44.1cf1d4"]]},{"id":"358289ea.d1af66","type":"rpi-ds18b20","z":"514ce859.e01408","topic":"","array":false,"name":"","x":270,"y":40,"wires":[["a438fcbb.e47e1","6573bd44.1cf1d4"]]},{"id":"4c274079.bfedc","type":"ui_dropdown","z":"514ce859.e01408","name":"","label":"Temperature","tooltip":"","place":"Fahrenheit","group":"eec24d39.3cbf7","order":1,"width":0,"height":0,"passthru":true,"options":[{"label":"Fahrenheit","value":"f","type":"str"},{"label":"Celcius","value":"c","type":"str"}],"payload":"","topic":"","x":90,"y":100,"wires":[["4523fb4c.a05494"]]},{"id":"b5db9b99.4701f8","type":"inject","z":"514ce859.e01408","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":40,"wires":[["358289ea.d1af66"]]},{"id":"a438fcbb.e47e1","type":"function","z":"514ce859.e01408","name":"Convert C to F","func":"var tempc = msg.payload;\ntempf = tempc * 9/5 + 32;\ntempf = Math.round(tempf * 10) / 10;\nmsg.payload = tempf;\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":40,"wires":[["ffa4fbdc.8f8348"]]},{"id":"ffa4fbdc.8f8348","type":"ui_gauge","z":"514ce859.e01408","name":"","group":"2695801d.e533b","order":5,"width":0,"height":0,"gtype":"gage","title":"Air Temp","label":"units","format":"{{value}}","min":0,"max":"120","colors":["#00b500","#e6e600","#ca3838"],"seg1":"34","seg2":"70","x":660,"y":40,"wires":[]},{"id":"2695801d.e533b","type":"ui_group","z":"","name":"Temps","tab":"95e58647.89a308","disp":true,"width":"4","collapse":false},{"id":"eec24d39.3cbf7","type":"ui_group","z":"","name":"Temperature","tab":"d3fb8df3.f85c8","order":1,"disp":false,"width":"6","collapse":false},{"id":"95e58647.89a308","type":"ui_tab","z":"","name":"Monitor & Control","icon":"pool","disabled":false,"hidden":false},{"id":"d3fb8df3.f85c8","type":"ui_tab","z":"","name":"Settings","icon":"settings","disabled":false,"hidden":false}]