You do not need context to do this. If you set the switches to react on input, then you can feed the output of python and tuya devices in to the dashboard switch, so it will stay in sequence.
I do not have your flow or all your inputs and output values so my example may need adjusting to work with your tuya devices. I have also simulated the tuya devices in the example, but these may not be correct either, as there is lots of missing info in your posts.
Any way hope it helps work out the wiring and logic
[{"id":"24a6de4d3ea58f69","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":1160,"wires":[["b14b663935c2c1aa","29b83b431941b459"]]},{"id":"b14b663935c2c1aa","type":"function","z":"65617ffeb779f51c","name":"simulate tuya device","func":"msg.payload = {\"data\":{\"devId\":\"51306830483fda2231dc\",\"dps\":{\"1\":msg.payload},\"t\":1680535178},\"deviceId\":\"51306830483fda2231dc\",\"deviceName\":\"Stube\"};\nlet output = [msg,msg]\noutput[(msg.payload.data.dps[\"1\"] === true ? 1 : 0)] = null\nreturn output;","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":1200,"wires":[["6122c4f4fef5f2cb","8f4e8413d895efbe"],["493ebca7b98b8932","8f4e8413d895efbe"]]},{"id":"29b83b431941b459","type":"ui_switch","z":"65617ffeb779f51c","name":"","label":"stube","tooltip":"","group":"2d4fe667.28f8ba","order":19,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"className":"","x":370,"y":1120,"wires":[["b14b663935c2c1aa"]]},{"id":"7b199a77eca0a7dc","type":"inject","z":"65617ffeb779f51c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":110,"y":1200,"wires":[["b14b663935c2c1aa","29b83b431941b459"]]},{"id":"6122c4f4fef5f2cb","type":"debug","z":"65617ffeb779f51c","name":"debug 254","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":1180,"wires":[]},{"id":"493ebca7b98b8932","type":"debug","z":"65617ffeb779f51c","name":"debug 255","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":650,"y":1240,"wires":[]},{"id":"8f4e8413d895efbe","type":"change","z":"65617ffeb779f51c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.data.dps[\"1\"]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":1120,"wires":[["29b83b431941b459"]]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":2,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]