ZHA - Xiaomi Mijia Round Wireless Switch (WXKG01LM) - lumi.sensor_switch

This makes me think about what I’ve read in the zigbee2mqtt docs some time ago about this button
and the configurable hold timeout:

  • hold_timeout: The WXKG01LM only reports a button press and release.By default, a hold action is published when there is at least 1000 ms between both events. It could be that due to delays in the network the release message is received late. This causes a single click to be identified as a hold action. If you are experiencing this you can try experimenting with this option (e.g. set it to 2000) (value is in ms). The value must be a number with a minimum value of 0

changelog of this blueprint:

  • 2021-04-09: Changed Hold time default value (from 1s to 0.6s), along with the minimum hold time ( from 0 to 0.15s), max time (from 10s to 2.5s) and the step (from 1 to 0.05), to allow more granularity and flexibility. Kudos to @jant90

It could be that you have enough delay in the zigbee network that the release from a single press comes in too late and thats why It gets detected as a hold action. Try editing the blueprint to increase the hold time to a higher value again. Maybe this solves the issue

1 Like

Incredible work mate - I was troubleshooting some general lag in my entire system, which turned out to be caused by a very niche custom component that the author very kindly rebuilt to prevent any more issues.

You were spot on though, the integration was causing my HA to lag so much that single presses were being interpreted as hold actions. As soon as the integration was fixed, this problem went away.

Thanks for your help mate :pray:

Am I missing something here? I can’t see the actual blueprint import button in the topic anymore.

In the first post:
image

For those like me who are visual :slight_smile:

Thank you very much, I’d given up on this button thinking that I needed the Xiaomi gateway and the unusual handling of how clicking the button doesn’t show anything on the Device Info page where for other devices you can see all its sensors or diagnostics