Fan dimmer and switch does not match

Hi,
I have a fan controller (flashed with Tasmota on tuyo mcu).
It has a touch button to On/Off power and two buttons to increase/ reduce fan speed.

The dimmer gives the below MQTT state

1. DIMMER = {"POWER2":"ON","Dimmer":92}
2. POWER2 = OFF

The problem is the DIMMER also has POWER on/off function (if I dim to the lowest), besides the separate Power On/off button.

But when I Power On/Off using the separate button, the MQTT state of the POWER in Dimmer stills remains ON (as you can see in the upper example). The similar happens when the POWER state of the dimmer changes, it does not sync with the separate Power button state.

How do I solve this?

Hey

I hope you are having fun

Are you saying that you are getting both

1. DIMMER = {"POWER2":"ON","Dimmer":92}
2. POWER2 = OFF

at the same time?

Yes. Exactly. This is giving me a lot of headache away from having fun :woozy_face:

Also, if I power on/off using the dimmer, the Power switch updates accordingly.

But the dimmer on/off does not update if I power on/off using the switch.

Can you share a little more info of how you set this up.

Tasmota, OpenHAB and hardware

It doesn’t update what? Tasmota state

My Tasmota dimmer is setup like

However it dose not have buttons on it.

Yes, state of the Power switch.

Below is the configuration code. I use GUI for configuration.

UID: mqtt:topic:MQTT_Broker:FANLIGHT_OFFICE
label: FANLIGHT_OFFICE
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: Offline
  availabilityTopic: tele/FANLAMP_OFC/LWT
  payloadAvailable: Online
bridgeUID: mqtt:broker:MQTT_Broker
channels:
  - id: FAN_OFFICE
    channelTypeUID: mqtt:switch
    label: FAN
    description: ""
    configuration:
      commandTopic: cmnd/FANLAMP_OFC/POWER2
      stateTopic: stat/FANLAMP_OFC/POWER2
      off: Off
      on: On
  - id: Dimmer_Office
    channelTypeUID: mqtt:dimmer
    label: Fan
    description: ""
    configuration:
      commandTopic: cmnd/FANLAMP_OFC/DIMMER
      min: 1
      stateTopic: stat/FANLAMP_OFC/DIMMER
      transformationPattern: JSONPATH:$.Dimmer
      max: 100

Why don’t you link your switch channel with the power information within the dimmer mqtt-topic and ignore the additional power topic?

Thanks all. I was able to solve the problem. it was a configuration issue at tasmota end