-
Notifications
You must be signed in to change notification settings - Fork 4
/
Insteon Button Child
55 lines (38 loc) · 1.09 KB
/
Insteon Button Child
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
metadata {
definition (name: "Insteon Button Child", namespace: "cw", author: "Chris Wilson") {
capability "PushableButton"
capability "HoldableButton"
capability "DoubleTapableButton"
capability "ReleasableButton"
command "doubleTap", ["string"]
command "release", ["string"]
command "push", ["string"]
command "hold", ["string"]
attribute "button1", ""
attribute "button2", ""
attribute "button3", ""
attribute "button4", ""
attribute "button5", ""
attribute "button6", ""
attribute "button7", ""
attribute "button8", ""
}
}
def doubleTap(num) {
sendEvent(name: "doubleTapped", value: num)
}
def push(num) {
sendEvent(name: "pushed", value: num)
}
def hold(num) {
sendEvent(name: "held", value: num)
}
def release(num) {
sendEvent(name: "released", value: num)
}
def installed() {
sendEvent(name: "numberOfButtons", value: "8")
}
def updated() {
sendEvent(name: "numberOfButtons", value: "8")
}