Help setting up mqtt switch for a smartthings integration

I am having trouble setting up a switch for my mqtt integration with a smartthings switch

  • I know they are communicating as I can publish the topic smartthings/switch/MQTTSwitch/state
    payload: on which turns on the switch in smartthings
  • i am trying to make a simple switch to turn on and off the mqtt switch in home assistant, what would I type in the configuration.yaml file? do i have to make a sensor first? or just a switch like below? which I couldn’t get to work it says its unavailable? can someone check what is wrong with below?
  • mqtt:
    switch:
    • unique_id: MQTT_switch
      name: “MQTT Switch”
      state_topic: “smartthings/switch/MQTTSwitch/state”
      command_topic: “smartthings/switch/MQTTSwitch/state”
      availability:
      • topic: “smartthings/switch/MQTTSwitch/available”
        payload_on: “ON”
        payload_off: “OFF”
        state_on: “ON”
        state_off: “OFF”
        optimistic: false
        qos: 0
        retain: true

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%

Have you checked your discovery prefix?