`gauge` option suggestion

NaN happened because you are sending not numeric payload to gauge.
Also if you going to change gauge colors and you are using wide range of colors, you probably need to change the text color to something opposite to stand out.

Here's the starting point

[{"id":"61092de0.0d1e54","type":"ui_gauge","z":"7f6628bb.1a7bf8","name":"Disc usage","group":"c3c2cdb0.e07e","order":0,"width":"3","height":"3","gtype":"wave","title":"gauge","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1040,"y":840,"wires":[]},{"id":"26c9dc16.51dc34","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"3","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":810,"y":820,"wires":[["61092de0.0d1e54"]]},{"id":"8b41e199.77259","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"40","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":810,"y":860,"wires":[["61092de0.0d1e54"]]},{"id":"a72ed50.ea99528","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"75","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":810,"y":900,"wires":[["61092de0.0d1e54"]]},{"id":"546f709.e62f89","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"95","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":810,"y":940,"wires":[["61092de0.0d1e54"]]},{"id":"17f2a356.165f1d","type":"change","z":"7f6628bb.1a7bf8","name":"","rules":[{"t":"set","p":"colour","pt":"flow","to":"payload[0]","tot":"msg"},{"t":"set","p":"textcolour","pt":"flow","to":"payload[1]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":680,"wires":[["3ec871c4.392b4e"]]},{"id":"a843ecff.5d8f1","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"[\"cyan\",\"red\"]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":600,"wires":[["17f2a356.165f1d"]]},{"id":"fbc1ba88.e593e8","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"[\"green\",\"orange\"]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":340,"y":640,"wires":[["17f2a356.165f1d"]]},{"id":"91866984.76a5a8","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"[\"yellow\",\"blue\"]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":340,"y":680,"wires":[["17f2a356.165f1d"]]},{"id":"f6fed539.7b6788","type":"inject","z":"7f6628bb.1a7bf8","name":"","topic":"","payload":"[\"red\",\"white\"]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":720,"wires":[["17f2a356.165f1d"]]},{"id":"3ec871c4.392b4e","type":"change","z":"7f6628bb.1a7bf8","name":"","rules":[{"t":"set","p":"ui_control.options.waveColor","pt":"msg","to":"colour","tot":"flow"},{"t":"set","p":"ui_control.options.circleColor","pt":"msg","to":"colour","tot":"flow"},{"t":"set","p":"ui_control.options.waveTextColor","pt":"msg","to":"textcolour","tot":"flow"},{"t":"set","p":"ui_control.options.textColor","pt":"msg","to":"textcolour","tot":"flow"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":700,"wires":[["61092de0.0d1e54"]]},{"id":"591c0c28.ed6c84","type":"ui_ui_control","z":"7f6628bb.1a7bf8","name":"","x":600,"y":740,"wires":[["3ec871c4.392b4e"]]},{"id":"c3c2cdb0.e07e","type":"ui_group","z":"","name":"Gauge test","tab":"4d7cb4e4.88493c","order":6,"disp":true,"width":"6","collapse":false},{"id":"4d7cb4e4.88493c","type":"ui_tab","z":"","name":"VTEMP","icon":"dashboard","order":21,"disabled":false,"hidden":false}]
1 Like