Tasmota fw flashed, how to get MQTT working with HA?

i see a lot of people have this issue and now myself included. i’ve played around with the combinations but none work for my smart plug https://blakadder.github.io/templates/amysen_YS-WS01.html
. (im on HA .93.2)

tasmota information shows:
|MQTT Host|192.168.1.229|
|MQTT Port |1883|
|MQTT User |user|
|MQTT Client |DVES_611111|
|MQTT Topic |tuya01|
|MQTT Group Topic |tasmotas/cmnd/|
|MQTT Full Topic |tuya01/cmnd/|
|MQTT Fallback Topic |cmnd/DVES_611111_fb/|

my configuration.yaml shows:

switch:
  - platform: mqtt
    name: "kids room"
    command_topic: cmnd/tuya01/power
    state_topic: stat/tuya01/POWER
    availability_topic: tele/tuya01/LWT
    qos: 1
    retain: false
    payload_on:  "ON"
    payload_off: "OFF"
    payload_available:  "Online"
    payload_not_available: "Offline"

it shows up on the web GUI but clicking on the switch does nothing.

You have Tasmota set for discovery and you have the mqtt configured for manual… see the topic is different in tasmota.
When you enable MQTT discovery (SetOption19 1) then the topic changes…
cmnd/tuya01 becomes tuya01/cmnd
So edit the switches in the config for the right topic. Is there a reason you don’t just use discovery?

setting up mqtt discovery seems confusing when i saw it. im a newbie whereby copying n pasting is easier with little understanding.

i see what you mean with my code now so i fixed it and this works!

switch:
  - platform: mqtt
    name: "tuya kids"
    command_topic: tuya01/cmnd/power
    state_topic: tuya01/stat/POWER
    availability_topic: tuya01/tele/LWT
    qos: 1
    retain: false
    payload_on:  "ON"
    payload_off: "OFF"
    payload_available:  "Online"
    payload_not_available: "Offline"

thank you so much!