Original title: “IKEA Trådfri Remote: ZHA Double (and Triple) Click”
I updated the title after sharing the results of my Xiaomi remote experiments.
I recently picked up an IKEA Trådfri Remote to try out. My computer is in the Living Room and I thought it would be nice to have a multi function remote to manage the fan and lights around me. After watching the
zha_event logs I determined that I could get 9 functions out of the 5 button remote. 5 single clicks plus 4 long presses.
zha_event was not capturing an event for double clicks like my Xiaomi double switches do. I kept thinking there might be a way to capture clicks say a half second apart. As it turns out part of the trick was to delay the single click action by a half second to allow a chance for a second click to be detected!
Anyway, if you are interested in learning more about how I did it, I go into a lot of detail in an article on my blog (link below).
You can find full versions of my automation and script at the links below. My full automation handles multiple remotes instead of just the one in the below example.