This is a small hand wireless button , approx 3cmx3xm. It recognises 1x, 2x, 3x, 4x clicks. Apparently some models (with same model numberof WXKG11LM) recognise hold, but mine doesnt.
I have this setup in Shims as an On/Off device. The payload is like this
{"battery":100,"voltage":3145,"linkquality":97,"click":"double"}
Putting click as the payload key and leaving On Value blank, I get single, double, triple or quadruple populated in the device custom state of click. I can then create a trigger on the change of status when it equals one of these values.
The trouble is that the click state is not reset, so I have created a delayed action on my Button Topic Component Trigger to send a MQTT message back to the Button with a null click state. This works well.
The message back takes the values from the Indigo device states, so it has the correct values, as per this format.
{"battery":%%d:1473899162:battery%%,"voltage":%%d:1473899162:voltage%%,"linkquality":%%d:1473899162:linkquality%%,"click":""}