Mosquitto - MQTT, not updating state after restart

Environment:
Linux Ubuntu 18.04
Running:

  • HASS.IO
  • Mosquitto MQTT
  • MQTT devices running Tasmota

Problem:
Home Assistant will not update the state of the device

Relevant Information:

I am able to set Dimming, Power, Publish Commands, everything works.

Nothing in HASS.IO logs that pertain to MQTT

Retain switch on Sonoff set to 1 or ON

MQTT Broker Logs:

15:33:43 MQT: Connected
15:33:43 MQT: tele/tasmota-outlet-1674/LWT = Online (retained)
15:33:43 MQT: cmnd/tasmota-outlet-1674/POWER = 
15:38:15 MQT: tele/tasmota-outlet-1674/STATE = {"Time":"2019-07-23T15:38:15","Uptime":"0T01:45:17","Vcc":3.260,"Heap":18,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"BELL830","BSSId":"A0:1B:29:DA:2E:04","Channel":1,"RSSI":88,"LinkCount":1,"Downtime":"0T00:00:05"}}
15:43:15 MQT: tele/tasmota-outlet-1674/STATE = {"Time":"2019-07-23T15:43:15","Uptime":"0T01:50:17","Vcc":3.248,"Heap":18,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"BELL830","BSSId":"A0:1B:29:DA:2E:04","Channel":1,"RSSI":86,"LinkCount":1,"Downtime":"0T00:00:05"}}
15:46:26 MQT: stat/tasmota-outlet-1674/RESULT = {"POWER":"ON"}
15:46:26 MQT: stat/tasmota-outlet-1674/POWER = ON (retained)
15:48:15 MQT: tele/tasmota-outlet-1674/STATE = {"Time":"2019-07-23T15:48:15","Uptime":"0T01:55:17","Vcc":3.262,"Heap":18,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"BELL830","BSSId":"A0:1B:29:DA:2E:04","Channel":1,"RSSI":80,"LinkCount":1,"Downtime":"0T00:00:05"}}

MQTT “mosquitto_sub -t “#” -v” Output:

tele/tasmota-dimmer-4532/LWT Online
tele/tasmota-outlet-1246/LWT Online
tele/tasmota-outlet-1674/LWT Online
stat/tasmota-outlet-1674/POWER ON
light:
  - platform: mqtt
    state_topic: "stat/tasmota-dimmer-4532/RESULT"
    brightness_state_topic: "stat/tasmota-dimmer-4532/DIMMER"
    command_topic: "cmnd/tasmota-dimmer-4532/POWER"
    brightness_command_topic: "cmnd/tasmota-dimmer-4532/DIMMER"
    availability_topic: "tele/tasmota-dimmer-4532/LWT"
    value_template: '{{ value_json["POWER"] }}'
    brightness_value_template: '{{ value_json["DIMMER"] }}'
    brightness_scale: 100
    payload_available: "Online"
    payload_not_available: "Offline"
    payload_on: "ON"
    payload_off: "OFF"
    name: "Front Pot Lights" 

Andddddd by posting my own topic – I found the answer – the state_topic is based off POWER not RESULT. Got left in there when I was testing!

Corrected code works fine now:

SEE BELOW

But then the Dimmer wasn’t updating so I had to enable SetOption59 1 on the Tasmota/Sonoff.

Again Final Code was:

light:
  - platform: mqtt
    state_topic: "tele/tasmota-dimmer-4532/STATE"
    brightness_state_topic: "tele/tasmota-dimmer-4532/STATE"
    command_topic: "cmnd/tasmota-dimmer-4532/POWER"
    brightness_command_topic: "cmnd/tasmota-dimmer-4532/Dimmer"
    availability_topic: "tele/tasmota-dimmer-4532/LWT"
    value_template: '{{ value_json["POWER"] }}'
    brightness_value_template: "{{value_json.Dimmer}}"
    brightness_scale: 100
    payload_available: "Online"
    payload_not_available: "Offline"
    payload_on: "ON"
    payload_off: "OFF"
    name: "Front Pot Lights"