Help setting up mqtt switch for a smartthings integration

You will need to post your code using Preformatted Text tags before anyone will likely assist. They are the </> icon in the posting toolbar.

Read this - especially item 11:

Lastly - isn’t there a SmartThings integration now which means you no longer need to use MQTT? I don’t use SmartThings so not 100%