Can I restore previous dim level on a single tap after a double tap set dim to full?

I'm using Joel's GE Enbrighten ZW+ Dimmer driver on a Honeywell zw+ dimmer. Setup a Rule Machine app to set the dim level to 100% on a double tap. All works fine. Now I'm wondering has anyone created a rule where a bottom tap turns the light off and then a single tap turns it back on to the previous dim level that it was set at before double tap set it to 100? Like saving the current dim level during a double tap in a variable specific to the switch? And then restore the dim to that level if the variable is found when single tap happens again? Not too familiar w/ Hubitat rules yet but being a programmer, I'm hoping something like this is possible. Any suggested steps or general outline appreciated. Thx

1 Like

Let me get your goal straight here: Say the light/switch is already on at Level A. You want a double-tap (up) event to brighten the light to 100. Then the very next tap (up) event – whether the light remains on or has been turned off in the interim – should return the light to Level A.

Is that correct overall? Also, have you checked Logs or the switch's own Details page to determine what PUSHED or DOUBLE-TAPPED events are assigned to those particular actions?

1 Like

Basically, though I figured one would hit off (bottom tap) in between if that made for a better algorithm as not having looked at that in the logs, I'm not sure if a single top tap event would register if the switch was already on. Thx

1 Like

That's why I suggested looking at the switch's Details Page (better yet Logs > Live Logs) to see for yourself whether an event is registered by tapping up once AFTER you had tapped twice some seconds earlier. Lemme know. Because if so, I have a rule in mind.

1 Like

Thx. Will do. Got wrapped up into some other things since we just moved but will hopefully be able to do this soon.

1 Like

And I know this has nothing to do with your question but, Zooz dimmers have this functionality built into the firmware. The double-tap level and single tap level are each configurable. The non-smart Lutron Maestro dimmers work the same way as well (sans configuration).

2 Likes

Switch is a ZW+ Honeywell Smart Dimmer [ZW3010] running with Joel's GE Enbrighten ZW+ Dimmer driver.

Here are live logs doing an Off, On, Double tap, On [where I use the Rule Machine to set the level to 100% with a fade of 4 for double tap]. On event indeed happens while the light is already on at 100% after the double tap!

dev:52023-03-15 11:09:13.117 PMinfoDave's Bath is 99%

dev:52023-03-15 11:09:13.112 PMdebug---SwitchMultilevelReport V3--- Dave's Bath sent SwitchMultilevelReport(value:99)

dev:52023-03-15 11:09:13.108 PMdebugparse description: zw device: 0B, command: 2603, payload: 63 , isMulticast: false

dev:52023-03-15 11:09:13.090 PMinfoDave's Bath turned on [physical]

dev:52023-03-15 11:09:13.089 PMdebugPhysical ON Triggered

dev:52023-03-15 11:09:13.087 PMdebugCentralSceneNotification V1 Called.

dev:52023-03-15 11:09:13.084 PMdebugparse description: zw device: 0B, command: 5B03, payload: 1F 80 01 , isMulticast: false

dev:52023-03-15 11:09:06.776 PMdebugsetLevel(value, duration) >> value: 99, duration: 4

dev:52023-03-15 11:09:06.773 PMdebugsetLevel(100, 4)

dev:52023-03-15 11:09:06.569 PMinfoDave's Bath had Doubletap up (button 3) [physical]

dev:52023-03-15 11:09:06.568 PMdebugDouble Tap Up Triggered

dev:52023-03-15 11:09:06.567 PMdebugCentralSceneNotification V1 Called.

dev:52023-03-15 11:09:06.562 PMdebugparse description: zw device: 0B, command: 5B03, payload: 1E 83 01 , isMulticast: false

dev:52023-03-15 11:09:06.560 PMdebugThis does nothing in this driver, and can be ignored...

dev:52023-03-15 11:09:06.558 PMdebug---BASIC SET V1--- Dave's Bath sent BasicSet(value:255)

dev:52023-03-15 11:09:06.542 PMdebugparse description: zw device: 0B, command: 2001, payload: FF , isMulticast: false

dev:52023-03-15 11:09:01.075 PMinfoDave's Bath is 99%

dev:52023-03-15 11:09:01.070 PMinfoDave's Bath was turned on [physical]

dev:52023-03-15 11:09:01.067 PMdebug---SwitchMultilevelReport V3--- Dave's Bath sent SwitchMultilevelReport(value:99)

dev:52023-03-15 11:09:01.062 PMdebugparse description: zw device: 0B, command: 2603, payload: 63 , isMulticast: false

dev:52023-03-15 11:09:00.142 PMinfoDave's Bath turned on [physical]

dev:52023-03-15 11:09:00.141 PMdebugPhysical ON Triggered

dev:52023-03-15 11:09:00.140 PMdebugCentralSceneNotification V1 Called.

dev:52023-03-15 11:09:00.136 PMdebugparse description: zw device: 0B, command: 5B03, payload: 1D 80 01 , isMulticast: false

dev:52023-03-15 11:08:54.258 PMinfoDave's Bath was turned off [physical]

dev:52023-03-15 11:08:54.254 PMdebug---SwitchMultilevelReport V3--- Dave's Bath sent SwitchMultilevelReport(value:0)

dev:52023-03-15 11:08:54.251 PMdebugparse description: zw device: 0B, command: 2603, payload: 00 , isMulticast: false

dev:52023-03-15 11:08:53.303 PMinfoDave's Bath turned off [physical]

dev:52023-03-15 11:08:53.302 PMdebugPhysical OFF Triggered

1 Like

Okay, so here's my thought process... since the switch broadcasts (and more importantly, HE sees) the "On" event after the light has already been turned "On" or brightened, we can leverage that in a Rule Machine rule, as follows:

TRIGGER
Button: Dave's Bath == 3

ACTIONS
Capture: Dave's Bath
Wait for Event > Dave's Bath: On
Restore: Dave's Bath

The only major stumbling block I foresee is if this Rule can't perform its Capture ahead of your DoubleTap handler doing its thing (raising Level to 100), then we'll have to involve Hub Variables, and construct a virtual capture from scratch.

P.S. Absolutely all of this could (perhaps even should) be done in Button Controller. As your button-related workflow grows more complex, BC wins over RM.

1 Like

Thanks for the ideas. I'll read up on the button controller. Does button 3 mean the upper was double tapped? Again, may be a while, but I'll eventually post back what I figure out and tried.

Yep, the numbering scheme is pretty typical across most devices (e.g. toggle switches), so that's why watching in Logs is so helpful. For example, my GE/Jasco in-wall switches map out thusly:
1 = On (tap up) , 2 = Off (tap down) , 3 = (double-tap up), 4 = (double-tap down)

I use those designations to my advantage in Rule Machine or Button Controller app, particularly if I want to associate buttons 3 and 4 with routines (such as an auto-off fan timer, or sending commands to Alexa while I shower, etc.).

1 Like