Switch turn on with the service "switch.turn_off

Recently, I decided to completely rebuild my Home Assistant setup from scratch. This also included switching to a new Zigbee coordinator instead of the HUE hub. I purchased the SLZB-06M and configured it in Home Assistant with “Zigbee2MQTT”.

Since a new Sonoff ZBmini had to be installed in the house anyway, I created one automation in Node-RED. Everything works fine except for one issue:

Occasionally, when the Sonoff is supposed to turn off, it doesn’t. However, the “switch.turn_off” command is still sent. In the logs, I can only find:

homeassistant log

Switch - Bathroom mirror lamp turned on, triggered by action Switch: Turn Off.

So the correct command is being sent, but it seems to work in reverse. I’m not sure where to look anymore: everything is updated, re-paired, and reconfigured, but nothing seems to help. Could it be the SLZB-06M, or is this a bug in Home Assistant?

Has anyone experienced something similar or can point me in the right direction?

Best regards,
Nathan

Have you checked to see if the device is dropping out or losing connectivity, it could be incorrectly reporting its status and treating the command as a Toggle rather than an on\off when it reconnects.

When I look at the map in Z2M, there seems to be good connectivity. There’s also another device that routes its connection through the Sonoff, and it always seems to respond correctly.

What’s the best way to log connectivity and get insights into whether the devices are dropping out or showing reduced connectivity?

What’s the best way to log connectivity and get insights into whether the devices are dropping out or showing reduced connectivity?

I asked the same question a while back. Apparently there isn’t any good or reliable way. Even the data that’s there in the map seems to largely be a suggestion.