Here is the flow with debugs renamed"
[{"id":"18e8e789.778a08","type":"tab","label":"Translate 433mhz","disabled":false,"info":""},{"id":"68134d2b.4fc204","type":"debug","z":"18e8e789.778a08","name":"From rtl_433","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":110,"y":80,"wires":[]},{"id":"31e8fc24.42c854","type":"rtl_433","z":"18e8e789.778a08","name":"","device":"","frequency":"","protocols":"","x":90,"y":20,"wires":[["68134d2b.4fc204","a153d738.c85908"]]},{"id":"a153d738.c85908","type":"switch","z":"18e8e789.778a08","name":"","property":"payload.code","propertyType":"msg","rules":[{"t":"eq","v":"450513","vt":"str"},{"t":"eq","v":"8529fb","vt":"str"},{"t":"eq","v":"2529fb","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":290,"y":35.5,"wires":[["98768616.8d5188"],[],[]],"outputLabels":["relay 1","relay 2","relay 3"]},{"id":"2f917e27.809da2","type":"mqtt out","z":"18e8e789.778a08","name":"","topic":"Relay_1","qos":"0","retain":"true","broker":"98e43eb6.346e2","x":500,"y":40,"wires":[]},{"id":"38d8e069.8596d","type":"ui_switch","z":"18e8e789.778a08","name":"","label":"Relay #1","tooltip":"","group":"dce9e7a2.d20c78","order":4,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"Relay 1","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":920,"y":160,"wires":[["306abda4.e31ad2","cd668987.36ce98"]]},{"id":"306abda4.e31ad2","type":"change","z":"18e8e789.778a08","name":"copy msg.payload --> flow.relay1","rules":[{"t":"set","p":"relay1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":804,"y":240,"wires":[["2c70fbb1.e85804"]]},{"id":"cd668987.36ce98","type":"exec","z":"18e8e789.778a08","command":"python3 send.py -p 367 -t 1 13148322","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Relay #1 Send Code","x":1160,"y":160,"wires":[["66b2d671.f35108"],["42ff3b56.3b5184"],["e9127a68.ee2328"]]},{"id":"98768616.8d5188","type":"change","z":"18e8e789.778a08","name":"copy flow.relay1 --> msg.payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"relay1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":184,"y":160,"wires":[["d81f173e.5ee2b8","afa62b39.2c6098"]]},{"id":"d81f173e.5ee2b8","type":"switch","z":"18e8e789.778a08","name":"is payload true or false?","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":457,"y":160,"wires":[["f5f80e84.274ab","e3b16575.341ab8"],["b9f164e3.15b8b8","98223be9.ed36f8"]]},{"id":"b9f164e3.15b8b8","type":"change","z":"18e8e789.778a08","name":"if false, set to true","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":180,"wires":[["32e70ffb.52415","38d8e069.8596d"]]},{"id":"f5f80e84.274ab","type":"change","z":"18e8e789.778a08","name":"if true, set to false","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":140,"wires":[["38d8e069.8596d","5b40682c.520e68"]]},{"id":"afa62b39.2c6098","type":"debug","z":"18e8e789.778a08","name":"from read the initial relay state","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":190,"y":260,"wires":[]},{"id":"e3b16575.341ab8","type":"debug","z":"18e8e789.778a08","name":"from payload check top","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":450,"y":100,"wires":[]},{"id":"2c70fbb1.e85804","type":"debug","z":"18e8e789.778a08","name":"from copy UI switch state","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1090,"y":300,"wires":[]},{"id":"98223be9.ed36f8","type":"debug","z":"18e8e789.778a08","name":"from payload check bottom","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":440,"y":220,"wires":[]},{"id":"5b40682c.520e68","type":"debug","z":"18e8e789.778a08","name":"from if true set false","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":990,"y":80,"wires":[]},{"id":"b71e8ba1.a118c8","type":"ui_switch","z":"18e8e789.778a08","name":"test switch","label":"Test Switch","tooltip":"","group":"dce9e7a2.d20c78","order":3,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":450,"y":440,"wires":[[]]},{"id":"f43ca71c.df5a38","type":"inject","z":"18e8e789.778a08","name":"inject boolean true","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":220,"y":400,"wires":[["b71e8ba1.a118c8"]]},{"id":"de779ef.f18c36","type":"inject","z":"18e8e789.778a08","name":"inject boolean false","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":210,"y":480,"wires":[["b71e8ba1.a118c8","b089f283.13567"]]},{"id":"d7fcbe60.8603b","type":"inject","z":"18e8e789.778a08","name":"inject boolean true","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":710,"y":40,"wires":[["f5f80e84.274ab"]]},{"id":"ff53209d.dd4f9","type":"inject","z":"18e8e789.778a08","name":"inject boolean false","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":490,"y":280,"wires":[["b9f164e3.15b8b8"]]},{"id":"b089f283.13567","type":"debug","z":"18e8e789.778a08","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":450,"y":540,"wires":[]},{"id":"32e70ffb.52415","type":"debug","z":"18e8e789.778a08","name":"from if false set true","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1110,"y":220,"wires":[]},{"id":"66b2d671.f35108","type":"debug","z":"18e8e789.778a08","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1330,"y":80,"wires":[]},{"id":"42ff3b56.3b5184","type":"debug","z":"18e8e789.778a08","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1350,"y":160,"wires":[]},{"id":"e9127a68.ee2328","type":"debug","z":"18e8e789.778a08","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1330,"y":220,"wires":[]},{"id":"98e43eb6.346e2","type":"mqtt-broker","name":"P-Pi-Gibson","broker":"192.168.1.101","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"dce9e7a2.d20c78","type":"ui_group","name":"Object detection","tab":"5132060d.4cde48","order":1,"disp":true,"width":"7","collapse":false},{"id":"5132060d.4cde48","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
Below is the output from clicking the UI switch from within NR
The relay does activate from this UI click, however the graphic does not change status.
But now with this flow, the 433 button press does not change the graphic and subsequently the set node that copies the switch state does not get the new switch state payload that is to be read at the start of the flow from when the rtl_433 node triggers.