Well, this is the flow:
[{"id":"32b67a5d.231c86","type":"inject","z":"1781e581.31721a","name":"Setup","topic":"","payload":"foo","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"3","x":2500,"y":730,"wires":[["49d7ad48.0f8b54"]]},{"id":"49d7ad48.0f8b54","type":"function","z":"1781e581.31721a","name":"Setup","func":"msg = {\n \"colourA\": \"red\",\n \"colourB\": \"lime\",\n \"txtA\": \"Disabled\",\n \"txtB\": \"Enabled\",\n \"txtclrA\": \"black\",\n \"txtclrB\": \"black\",\n \"payloadA\": 0,\n \"payloadB\": 1,\n \"topicSET\": \"CONTROL\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":2630,"y":730,"wires":[["203af629.7c0bba","2dc74b3c.896bc4"]]},{"id":"16f7601f.88c79","type":"ui_button","z":"1781e581.31721a","name":"Push Button 1","group":"fefa8817.8dc6c8","order":1,"width":"3","height":"1","passthru":false,"label":"{{msg.txt}}","tooltip":"","color":"{{msg.fontclr}}","bgcolor":"{{msg.colour}}","icon":"","payload":"X","payloadType":"str","topic":"","x":2660,"y":770,"wires":[["203af629.7c0bba"]]},{"id":"203af629.7c0bba","type":"function","z":"1781e581.31721a","name":"Push Button","func":"var state = context.get(\"STATE\")||0;\n\n// Look for a !X message to get values.\nif (msg.payload != \"X\") //Do this if the message is NOT \"X\"\n{\n //\n //node.warn(\"Setting up\");\n // Background colours first.\n //\n context.set(\"ABGC\", msg.colourA);\n context.set(\"BBGC\", msg.colourB);\n //\n // Now do text.\n //\n context.set(\"Atxt\", msg.txtA);\n context.set(\"Btxt\", msg.txtB);\n //\n // Font colours.\n //\n context.set(\"AFC\",msg.txtclrA);\n context.set(\"BFC\",msg.txtclrB);\n //\n // Payloads.\n //\n context.set(\"PayloadA\", msg.payloadA);\n context.set(\"PayloadB\", msg.payloadB);\n //\n // Topic.\n //\n if (msg.topicSET !== null)\n {\n context.set(\"Topic\",msg.topicSET);\n } else\n {\n context.set(\"Topic\",\"~\");\n }\n msg.colour = msg.colourA;\n msg.fontclr = msg.txtclrA;\n msg.txt = msg.txtA;\n msg.topic = msg.topicSET;\n msg.payload = msg.payloadA;\n return msg;\n}\n// Now on to the real stuff.\nif (msg.payload == \"X\")\n{\n state = (state + 1)% 2;\n //node.warn(state);\n context.set(\"STATE\",state);\n}\nif (state === 0)\n{\n // Condition A\n msg.payload = context.get(\"PayloadA\");\n msg.colour = context.get(\"ABGC\");\n msg.txt = context.get(\"Atxt\");\n msg.fontclr = context.get(\"AFC\");\n} else\n{\n // Condition B\n msg.payload = context.get(\"PayloadB\");\n msg.colour = context.get(\"BBGC\");\n msg.txt = context.get(\"Btxt\");\n msg.fontclr = context.get(\"BFC\");\n}\nif (context.get(\"Topic\") == \"~\")\n{\n msg.topic = \"\";\n} else\n{\n msg.topic = context.get(\"Topic\");\n}\nreturn msg;\n","outputs":1,"noerr":0,"x":2650,"y":820,"wires":[["16f7601f.88c79","9e5facf.d7f10d","71190f2d.713178"]]},{"id":"9e5facf.d7f10d","type":"debug","z":"1781e581.31721a","name":"Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":2820,"y":770,"wires":[]},{"id":"fefa8817.8dc6c8","type":"ui_group","z":"","name":"Audio","tab":"b128eb09.9f681","order":3,"disp":true,"width":"4","collapse":false},{"id":"b128eb09.9f681","type":"ui_tab","z":"","name":"TV_Remote_control","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
Screen shot:
I have never seen such messages with these attributes before on any flow I have worked.
Digging, it would seem it is coming from the button
icon.
As much as I am at odds with buttons
just now, I have handled a lot of messages from buttons
and can honestly say I have not seen these attributes (?term?) on any message before.
I'll check another machine for the sake of making myself look (more) stupid than I am.