State value of light out of sync

I have one light that is causing me some grief.

From either on or off, a single toggle of the light will correctly change the physical state and the state in MQTT is represented correctly, but home assistant will bounce back to the prior state. This gives the representation of it still being off, after the being turned on and vice versa.

A second toggle of the home assistant switch will correct it back and sync it up again. And you then get the same behaviour in reverse if you toggle it a third (desyncs).

For example after a single press I can somehow get into this state:

image

A second toggle corrects it but then turning it off again I get this:

The physical state always changes correctly the first time it’s just the representation in home assistant. The second correcting call will sync it back up as home assistant is declaring the state change to what it already is (as it thinks it’s the opposite) and so the physical state doesn’t change.

What could be causing this?

Running latest home assistant and zigbee2mqtt.

Home assistant 2021.6.3
zigbee2mqtt 1.19.1

Latest is not a version.

Edited to include versions

1 Like

I should have asked, what bulb and what state does the zigbee2mtt gui say it is in?

It reports as: LXT56-LS27LX1.7 by 3A Smart Home DE

But I purchased it from zemismart.

I have ten other instances of the same bulb that all work as expected.

And zigbee2mqtt reports it correctly, hence the state value correctly updating just not then being represented in home assistant.

Hmmm just launched a configure on the bulb in question and now it seems to be working fine.

What does configure do that wouldn’t have been done when joining it to the network or restarting zigbee2mqtt?

I don’t know what “configure” does but the behavior you were seeing is likely because the state topic/payload wasn’t correct for what HA was expecting.

HA expects the device to return a proper state. if not it goes back to display the previous known state.