Hereby an example flow,
[{"id":"695aa1b525b64598","type":"ui_gauge","z":"7c6ad896ba8a384a","name":"No format","group":"57423d36f7b8b4a1","order":2,"width":4,"height":4,"gtype":"gage","title":"{{topic}}","label":"{{unit}}","format":"{{value}}","min":0,"max":"2000","colors":["#00b33c","#00b33c","#00b33c"],"seg1":"","seg2":"","diff":false,"className":"","x":400,"y":680,"wires":[]},{"id":"b81a0eb36ae1a20e","type":"function","z":"7c6ad896ba8a384a","name":"zero","func":"let val = parseInt(0.01234);\nmsg = {topic: \"no format\", payload: val, unit: \"Watt\"};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":680,"wires":[["695aa1b525b64598"]]},{"id":"f252698beb443440","type":"inject","z":"7c6ad896ba8a384a","name":"1 sec","props":[],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":90,"y":720,"wires":[["b81a0eb36ae1a20e","6c7ae78586f7b3d8","e570b23fc930d9a2"]]},{"id":"6c7ae78586f7b3d8","type":"function","z":"7c6ad896ba8a384a","name":"zero","func":"let val = 0;\nmsg = { topic: \"+ format\", payload: val, unit: \"Watt\"};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":760,"wires":[["73ddc6a4cf3252ec"]]},{"id":"73ddc6a4cf3252ec","type":"ui_gauge","z":"7c6ad896ba8a384a","name":"+ format","group":"57423d36f7b8b4a1","order":11,"width":4,"height":4,"gtype":"gage","title":"{{topic}}","label":"{{unit}}","format":"{{value | number: 0}}","min":0,"max":"2000","colors":["#00b33c","#00b33c","#00b33c"],"seg1":"","seg2":"","diff":false,"className":"","x":400,"y":760,"wires":[]},{"id":"e570b23fc930d9a2","type":"function","z":"7c6ad896ba8a384a","name":"1234","func":"let val = 1234;\nmsg = { topic: \"+ format\", payload: val, unit: \"Watt\"};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":800,"wires":[["0fc5d257d4bc41fd"]]},{"id":"bf69885e49afe793","type":"inject","z":"7c6ad896ba8a384a","name":"test","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":150,"y":600,"wires":[["8d85b5bf24ffc667"]]},{"id":"8d85b5bf24ffc667","type":"function","z":"7c6ad896ba8a384a","name":"1234","func":"let val = 1234;\nmsg = {topic: \"no format\", payload: val, unit: \"Watt\"};\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":600,"wires":[["695aa1b525b64598"]]},{"id":"0fc5d257d4bc41fd","type":"ui_gauge","z":"7c6ad896ba8a384a","name":"+ format","group":"57423d36f7b8b4a1","order":10,"width":4,"height":4,"gtype":"gage","title":"{{topic}}","label":"{{unit}}","format":"{{value | number: 0}}","min":0,"max":"2000","colors":["#00b33c","#00b33c","#00b33c"],"seg1":"","seg2":"","diff":false,"className":"","x":400,"y":800,"wires":[]},{"id":"57423d36f7b8b4a1","type":"ui_group","name":"test","tab":"ad12ad91.ab672","order":1,"disp":true,"width":"8","collapse":false,"className":""},{"id":"ad12ad91.ab672","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
If you restart your flows, you can clearly see the behavior.
The gauge with no format, will show {{units}}
, as you inject one time 1234
it will then show Watt
(for a while ????).. The gauge with format and value 0, with keep on showing {{unit}}.
The topic will keep on showing always, no problem.