[SOLVED] Sonoff Tasmota state not updating

I’m using the sonoff basic with tasmota 6.4.1 for some reason only some of the sonoff are showing the ON/OFF STATE. all configs are the same.

This is my things:

Bridge mqtt:broker:myMQTTBroker "Mosquitto" [ host="localhost", port=1883, secure=false, username="openhabian", password="xxxxxxxx", clientID="myMQTTClient" ]
    //Veranda Light
    Thing mqtt:topic:veranda01 "Veranda Light" @ "MQTT"  {
          Type switch : switch          "Power Switch"          [ stateTopic="stat/veranda01/POWER", commandTopic="cmnd/veranda01/POWER", on="ON", off="OFF" ] ]
          Type string : state01         "Switch State 01"       [ stateTopic="stat/veranda01/RESULT", transformationPattern="JSONPATH:$.POWER", on="ON", off="OFF" ]

    //Outdoor Bedroom Light
    Thing mqtt:topic:OtdoorBRL "Outdoor Bedroom Light" @ "MQTT"  {
          Type switch : switch          "Power Switch"          [ stateTopic="stat/OtdoorBRL/POWER", commandTopic="cmnd/OtdoorBRL/POWER", on="ON", off="OFF" ]
          Type string : state01         "Switch State 01"       [ stateTopic="stat/OtdoorBRL/RESULT", transformationPattern="JSONPATH:$.POWER", on="ON", off="OFF" ]



//Veranda Light
Switch veranda01_Switch        "Veranda Light"         (Lights)     [ "Switchable" ]     { channel="mqtt:topic:myMQTTBroker:veranda01:PowerSwitch", autoupdate="false" }
Switch veranda01_State         "Veranda State"                 { channel="mqtt:topic:myMQTTBroker:veranda01:state01" }

//Outdoor Bedroom Light
Switch OtdoorBRL_Switch        "Outdoor Bedroom Light"        (Lights)     [ "Switchable" ]     { channel="mqtt:topic:myMQTTBroker:OtdoorBRL:PowerSwitch", autoupdate="false" }
Switch OtdoorBRL_State         "Outdoor Bedroom State"         { channel="mqtt:topic:myMQTTBroker:OtdoorBRL:state01"}

I checked the doc but could not find an entry for autoupdate. Try to enable autoupdate :slight_smile:


I just added autoupdate=“false” even without it doesn’t work.

But did you try with autoupdate=“true”? I don’t know the default, maybe it’s default false.

Also, are you sure your STATE topic is correct? I use this topic for my basic.

autoupdate=“true” update the switch properly ON/OFF ON Basic UI is gone.

STATE topic is fine.

I will do more test and see now.

Wait what?
So this worked? But now it’s missing on the Basic UI :confused:?

I so “sense” a missunderstanding.
As far as I understood the OP the display and log-display of the textual "ON "or “OFF” is in question and not the missing update of the device state (by the text and by the icon).
IMHO this textual display can be configured in the sitemap file which is not shown.

the autoupdate=“true” updates the switch icon properly but still missing the “ON” or “OFF” for some of the switch.

All configs are the same. do you have an example on how to do it?

In the sitemap file use empty brackets after the Label, like “MyLabel []”. That way the “ON” or “OFF” will not be shown.

That is for label what about switch?

No, that is also for the label of a Switch!

See this thread.

doesn’t work for me.

switch item=LivingRML0_Switch[]

The correct syntax would be:

Switch item=LivingRML0_Switch label=“MyLabel[]”

This is what works for me.

Switch item=LivingRML0_Switch label="Kitchen Sink Light [%s]"


That Syntax should Show the ON/OFF, mine should not!

If your question is resolved, please mark this thread as resovled by selecting square checkmark Icon on the lower end of any reply.