Here is a basic flow to show you how to use a switch to do what you want.
[{"id":"57fb4f7ab53b9793","type":"inject","z":"0918ee609bf69fc7","name":"Your data","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":3800,"y":180,"wires":[["f562bf88970fe1fb"]]},{"id":"1a90e07956bcd8f4","type":"inject","z":"0918ee609bf69fc7","name":"ON","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":3780,"y":330,"wires":[["9d7bc6c2299e5369"]]},{"id":"54e6bdb5474e136b","type":"inject","z":"0918ee609bf69fc7","name":"OFF","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"OFF","payloadType":"str","x":3780,"y":290,"wires":[["9d7bc6c2299e5369"]]},{"id":"9d7bc6c2299e5369","type":"change","z":"0918ee609bf69fc7","name":"","rules":[{"t":"set","p":"switch1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":3940,"y":310,"wires":[[]]},{"id":"f562bf88970fe1fb","type":"switch","z":"0918ee609bf69fc7","name":"","property":"switch1","propertyType":"flow","rules":[{"t":"eq","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":3940,"y":180,"wires":[["64e2f07cced3321a"]]},{"id":"64e2f07cced3321a","type":"debug","z":"0918ee609bf69fc7","name":"Gauge","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":4110,"y":180,"wires":[]},{"id":"8a9801d6b03deea1","type":"comment","z":"0918ee609bf69fc7","name":"This is basically the switch node's output","info":"","x":3790,"y":260,"wires":[]}]