Set the switch to not pass messages through and to Show the State of the input.
Then when you click the switch it will send the new state, that will be fed back in at the front by the signal from whatever you are controlling and that will set the switch to show the state.
For the future please see this post for how to share a flow here - How to share code or flow json