Compatibility with Hue

@EricM_Inovelli already gave the code to expose the hold events and I’ve been using it for some time. I use SmartThings though so the latency isn’t worth it. Like you said though, release is already button 6. In the code below, hold would be button 8.

From @EricM_Inovelli in another thread:
"So technically you could add this into the central scene method (case 2 & break shown for reference):

   case 2:
   createEvent(buttonEvent(8, (cmd.sceneNumber == 2? "pushed" : "held"), "physical"))
   break

This would create a new button event (8). The mapping would look like this:

8 pushed -> top button held
6 pushed -> top button released
8 held -> bottom button held
6 held -> bottom button released

And also you would need to change this in initialize to register the extra button. I will probably include this in the next device handler release. Since SmartThings doesn’t have events based on “released” I’m just parsing the events as another push & held event.

sendEvent(name: "numberOfButtons", value: 8, displayed: true)"

1 Like