Dimmer with MQTT and Tasmota - HA not showing ON states

Tags: #<Tag:0x00007f7389efbe98> #<Tag:0x00007f7389efba10>

Hi, I have a Tuya Dimmer (MousHouse) flashed tasmota (8.4.0) OTA and connected with MQTT (autodiscover) in Hass.io. The device appears in HA and I can control correctly (switching and dimming).
The problem is that when a swtich the device ON it works but HA shows OFF moments after. The commands works fine, it is just the state in HA that shows incorrectly.

using GPIO 1,3 for tx,rx
TuyaMCU 21,3
dimmerrange 35,255
setoption19 1 for autodiscovery

any clues?

Think I figured it out! don’t know why, but in the MQTT config in Tasmota the field “Full Topic” was = %prefix%/%topic%/ by default. When I compared to another switch I have I noticed it was inverted. I changed to " %topic%/%prefix%/ ", turned off and on again the setoption19 and it is right on HA now.