I have mad this, as a subflow.
[{"id":"b1f41687.9504c8","type":"switch","z":"ab257b02.ffd96","name":"Set flow.toggle-me","property":"toggle-me","propertyType":"flow","rules":[{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":970,"y":380,"wires":[["3dbf00d.a4d688"],["f957fd1e.0b504"],["ab9e5ec9.2b9d2"]]},{"id":"3dbf00d.a4d688","type":"change","z":"ab257b02.ffd96","name":"Set to 1","rules":[{"t":"set","p":"toggle-me","pt":"flow","to":"1","tot":"str"},{"t":"set","p":"toggle-me","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":340,"wires":[[]]},{"id":"58a85b9.60326a4","type":"inject","z":"ab257b02.ffd96","name":"Startup","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":1060,"y":300,"wires":[["3dbf00d.a4d688"]]},{"id":"f47f1b5.f83efe8","type":"inject","z":"ab257b02.ffd96","name":"Toggle","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":770,"y":480,"wires":[["b1f41687.9504c8"]]},{"id":"2c8ffd11.771f9a","type":"inject","z":"ab257b02.ffd96","name":"Do something","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":770,"y":120,"wires":[["54018814.d1b928"]]},{"id":"f6c6173a.0989c8","type":"switch","z":"ab257b02.ffd96","name":"1,2,3","property":"toggle-me","propertyType":"flow","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":1190,"y":200,"wires":[["6bb47044.0aed3"],["dd379602.c5c89"],["71b46800.9ae3b8"]]},{"id":"54018814.d1b928","type":"change","z":"ab257b02.ffd96","name":"Fecth state","rules":[{"t":"set","p":"toggle-me","pt":"msg","to":"toggle-me","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":200,"wires":[["f6c6173a.0989c8"]]},{"id":"f957fd1e.0b504","type":"change","z":"ab257b02.ffd96","name":"Set to 2","rules":[{"t":"set","p":"toggle-me","pt":"flow","to":"2","tot":"str"},{"t":"set","p":"toggle-me","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":380,"wires":[[]]},{"id":"ab9e5ec9.2b9d2","type":"change","z":"ab257b02.ffd96","name":"Set to 3","rules":[{"t":"set","p":"toggle-me","pt":"flow","to":"3","tot":"str"},{"t":"set","p":"toggle-me","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":420,"wires":[[]]},{"id":"130f9132.2540b7","type":"switch","z":"ab257b02.ffd96","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"cont","v":"toggle","vt":"str"},{"t":"cont","v":"arrow_right_click","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":770,"y":280,"wires":[["54018814.d1b928","4f6d02a2.ab779c"],["b1f41687.9504c8","624ce1dd.5dca38"]]},{"id":"71b46800.9ae3b8","type":"function","z":"ab257b02.ffd96","name":"toggle","func":"msg.payload = { \"state\":\"toggle\"};\nreturn msg;","outputs":1,"noerr":0,"x":1350,"y":240,"wires":[[]]},{"id":"dd379602.c5c89","type":"function","z":"ab257b02.ffd96","name":"toggle","func":"msg.payload = { \"state\":\"toggle\"};\nreturn msg;","outputs":1,"noerr":0,"x":1350,"y":200,"wires":[[]]},{"id":"6bb47044.0aed3","type":"function","z":"ab257b02.ffd96","name":"toggle","func":"msg.payload = { \"state\":\"toggle\"};\nreturn msg;","outputs":1,"noerr":0,"x":1350,"y":160,"wires":[[]]},{"id":"624ce1dd.5dca38","type":"debug","z":"ab257b02.ffd96","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":380,"wires":[]},{"id":"4f6d02a2.ab779c","type":"debug","z":"ab257b02.ffd96","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":700,"y":200,"wires":[]}]