Hum Dimmer Switch Double Clicks?

Is there any way to add a "double-click" event to the dimmer? The built in driver doesn't seem to support it, only hold and release actions for buttons 2-3 (in addition to single push actions for the 4 buttons). Perhaps in the context of hubitat a "double-click" is a specific code sent by a remote, but could something programatically be done? Say detecing 2 single push events in short succession on the trigger side? I realise zigbee delay and uncaptured events may make this frustrating... Some of the 3rd party Hue apps support double click, but they might be doing the same thing, looking for 2 quick presses... The hue app itself supports a stateful click but no double clicks...

What we've been told by staff (Mike, who wrote the built-in driver) is that the hardware itself doesn't send different events for multi-taps, so that's all done with software on the Bridge side of things. (Loooking at the API, that seems reasonable to me--looks like there's a "rule" that resets the press count after a few seconds, and probably something that increments it after each time that I didn't bother looking for...)

There's no reason you couldn't do something similar on Hubitat with a rule or custom app. For example, you could track the current "push count" in a rule and do a different action depending on the current value. For only two taps, you could use a rule's built-in Private Boolean to easily track two states:

IF (Private Boolean is True) THEN
  Do single-tap action
  Set Private Boolean False
  Wait for event: elapsed time: 0:10:00
  Set Private Boolean True
ELSE
  Do double-tap action
  Set Private Boolean True
END-IF

The one thing I'd note is that you'd want to give Hubitat a fraction of a second (at least) between taps to "save" the variable values so they're correct the next time you tap the button, which will wake the app/rule. Hue does this very fast, perhaps because it uses a smaller and simpler data storage mechanism, but Hubitat might take a couple hundred milliseconds or so--so don't mash the buttons together super-quickly (but you shouldn't need to wait incredibly long, either).

Alternatively, I wrote a custom app to emulate Hue Dimmer-type behavior on Hubitat, letting you use multi-taps for buttons that don't "natively" support them:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.