Struggle configuring Sonoff mini using Tasmota through mqtt

Tags: #<Tag:0x00007f7391ab29d8> #<Tag:0x00007f7391ab2910> #<Tag:0x00007f7391ab2848> #<Tag:0x00007f7391ab2730>

I tried to follow the official doc to configure a tasmota (sonoff mini) switch on HA but just nothing happens.

I can see it in the state pages but is displayed as unavailable and I am not able to trigger it. I also don’t see any message in the mqtt topic when I try to trigger it through the states page.

If i trigger it manually everything works just fine and I see messges in the related mqqt topic

Here is my config

# Lights out
- platform: "mqtt"
  name: Lumières extérieur
  state_topic: "stat/sonoff-lights-out/RESULT"
  command_topic: "cmnd/sonoff-lights-out/power"
  availability_topic: "tele/sonoff-lights-out/STATE"
  # availability_topic: "tele/sonoff-lights-out/LWT"
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"
  value_template: "{{ value_json.POWER }}"
  retain: false

I also did tried to configured the mqtt autodiscover through yaml files (only using yaml) but nothing more happens. Any help would be greatly appreciated.

Two questions first :

  • what firmware did you flash ?
  • if you go to developer tools -> mqtt -> listen to topic -> listen to #, and you switch the mini, what do you see ?

FYI for anyone still interested.
I was also fiddling with that… my MQTT settings for a sonoff mini are the following:

  - platform: mqtt
    name: "Entry"
    command_topic: "light/sonoff-entry/cmnd/POWER"
    state_topic: "light/sonoff-entry/stat/RESULT"
    state_value_template: "{{value_json.POWER}}"
    availability_topic: "light/sonoff-entry/tele/LWT"
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    qos: 1
    retain: true

works for me.
NOTE: i have the prefix of the topic at the end and not at the beginnig (the cmnd tele etc. part)