[SOLVED] Configure Sonoff Switch (Tasmota 6.2.1) with mqtt

Hi,

I just got my first Sonoff switches and flashed them using Tasmota 6.2.1 (higher versions were unstable on WiFi). The switch works fine using the web ui, hassio sees when the switch turns on/off via physical switch or using the Tasmota UI, but I am not able to control it from hassio. My other mqtt devices work like MyQ (Liftmaster Garage and ADT Pulse).

When trying to control the switch, the switch flips but goes back to its original position.

Could anyone give me some guidance of what to check?

configuration.yaml

switch:
  - platform: mqtt
    name: "Heater"
    unique_id: b4e62d33aded
    command_topic: "cmd/heater/power"
    state_topic: "stat/heater/POWER"
    payload_on: "ON"
    payload_off: "OFF"
    retain: true

Had a typo in the command topic…

Should have been cmnd (missed the “n”)
command_topic: "cmnd/heater/power"