[Solved] Problem with Tradfri on/off switch binding to Xiaomi Smart Socket

I’ve recently started moving away from Zigbee2MQTT with a CC2531 to ZHA with a Conbee II, and have encountered an issue.

Without any automations controlling it, when I press the on segment of my Tradfri on/off switch, the nearby Xiaomi Smart Socket turns on, and pressing the off segment turns it off too.

At first it was doing it with two sockets, one at the opposite end of the house, but I noticed a light group in the ZHA group page, and removed that, so now it is only doing it with the one.

I’ve tried using the unbind tool under manage clusters, but that did nothing.

Just wondering what the best way to set the tradfri button to only report the zha_event rather than be linked to the socket too?

Do I factory reset then reconnect either or both of the devices?

I still have 5-6 smart sockets and 2 of the on/off buttons to migrate, so is there a specific order in which it is best to pair these things to ensure they don’t bind like this in the future?

Found a solution after a helpful Redditor pointed me in the right direction

  • Removed the Tradfri remote from ZHA and pressed the on/off buttons on it, nothing happened (as expected).
  • Paired it again being super careful not to press the on/off buttons - no issues
  • Press the on/off buttons and the Xiaomi socket turns on/off still
  • Repeat process 3 more times, still the same results
  • Remove the Xiaomi socket from ZHA, press the on/off buttons on the Tradfri remote, Xiaomi socket suddenly appears in the ZHA device list (not expected, as Permit Join was off at this point)
  • Repeat process 2 more times, still the same results
  • Configure the Xiaomi socket with the entity name and device names as I want them
  • Look in the ZHA Groups tab and see a default Light Group with the Xiaomi socket and Deconz Conbee II in it
  • Remove the Xiaomi Socket from the Group
  • Delete the Group
  • Press the on/off buttons on the Tradfri remote
  • Nothing happens
  • Frantically toggle the Tradfri remote on/off a bazillion times to ensure this isn’t a glitch
  • Still nothing happens
  • Re-enable the automation for controlling my lights via the Tradfri remote
  • Press the on/off buttons on the Tradfri remote
  • Lights come on/go off, Xiaomi socket does nothing

Result!

I was so glad to find this post because I thought I was going mad. I have a Tradfri button which allows me to toggle a Tradfri socket on my bedside light, via an automation of course. A week ago I pressed the button to turn off the light, and the ceiling lights in the bedroom lit up. The ceiling lights are controlled by a Xiaomi smart relay. Since then, every time I press the button, it activates the ceiling lights and it seems there is nothing I can do to stop this.

  • I removed the automations for the Tradfri button and the (Xiaomi) button operating the ceiling lights.
  • I removed the Tradfri button from ZHA (I’m using Conbee II plus the ZHA integration)
  • I removed the Tradfri socket from ZHA and re-paired it.
  • I carefully re-paired the Tradfri button, as you did. Pressed it and Xiaomi relay activated again!
  • I have investigated all of the links in ZHA including thos shown in visualisation tab. Nothing to show a direct link which would activate the Xiaomi relay.
  • Based on your solution, I have reviewed the Groups in ZHA, hoping to see a default Lights group. It doesn’t exist and none of the other groups include either of the devices which create the problem.
  • I have re-built the automation for the button, and it continues to misbehave, but I have added an action to switch off the offending light. That works, but not until the light has flashed on briefly. A kludge, and annoying!

I am posting this in the hopes that someone else may have another suggestion of what to do. I’m assuming that somehow or other the Zigbee signal from the Tradfri button directly triggers the Xiaomi relay without HA knowing anything about it.

Similar problem here.

I have several sonoff buttons and a mi power plug. All of the buttons turn the plug on/off. That really sucks because that way I can accidentally turn my pc off while it’s running.

I can’t find a solution anywhere and unbinding doesn’t work.

Does anyone has an idea how to unbind? I want to be able to decide myself what gets triggered by what