I have around 50 devices in my Zigbee2MQTT environment, and all of them work perfectly — except for two Sonoff ZBMINIL2 switches.
The issue: The state of these two switches is not reflected correctly in Home Assistant.
I can control the lights (turn them on and off) from Home Assistant, and I see the correct state updates in the Zigbee2MQTT interface.
Here’s a content of the “status” page from the device in Zigbee2MQTT:
However, in Home Assistant, the entity state remains stuck at "unknown"
Is there anything I can check to figure out why this issue only affects these two devices, while all others work flawlessly?
Unfortunately this wasn’t the issue with that. I tried renaming it (with the toggle to also change the HA name), the names match and it still doesn’t show the actual status, just ‘unknown’.
Actually, I don’t have any fully working ZBMINIL2. The two that I have and that don’t fully work have different firmware versions (1.0.14 & 1.0.10).
OTA updates aren’t working properly as well, which wouldn’t bother me that much if the state was reported correctly.
It turns out my Zigbee2MQTT configuration.yaml contained a fair amount of unnecessary or broken configuration — most likely some leftover or malformed customization. Here’s what the relevant section looked like:
I removed everything except for the friendly_name and qos lines.
I still needed to adjust the type with a helper inside homeassistant, so that the switch became a lightbulb again. But thats an easy fix. I have no clue here all of the configuration came from, but I’m glad that I got it working.