Congratulations!!
With just two nodes: amazing.
I slighly changed it to better understand how it works, I made a "semaphore".
[{"id":"1612856b.8afac3","type":"tab","label":"semaphore btn","disabled":false,"info":""},{"id":"c421e3a4.c3d4","type":"ui_button","z":"1612856b.8afac3","name":"","group":"82869eba.d348d","order":2,"width":0,"height":0,"passthru":false,"label":"{{topic}}","tooltip":"","color":"{{msg.color}}","bgcolor":"{{msg.background}}","icon":"","payload":"whatever","payloadType":"str","topic":"topic","topicType":"msg","x":380,"y":195,"wires":[["2f405f93.2bf4a"]]},{"id":"2f405f93.2bf4a","type":"function","z":"1612856b.8afac3","name":"","func":"//context.count = (context.count || 0) + 1;\n//msg.topic = context.count;\n\nswitch (context.status) {\n case \"green\" : \n context.status = \"orange\";\n msg.background=\"orange\";\n break;\n case \"orange\" : \n context.status = \"red\";\n msg.background=\"red\";\n break;\n case \"red\" : \n context.status = \"green\";\n msg.background=\"green\";\n break;\n default : \n context.status = \"orange\";\n msg.background=\"orange\";\n break;\n}\nmsg.color = \"black\";\nmsg.topic = context.status;\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":360,"y":345,"wires":[["c421e3a4.c3d4"]]},{"id":"82869eba.d348d","type":"ui_group","name":"Old Mayflower","tab":"9979cb8a.2a3238","order":2,"disp":true,"width":"9","collapse":false},{"id":"9979cb8a.2a3238","type":"ui_tab","name":"TEST","icon":"dashboard","order":20,"disabled":false,"hidden":false}]