@@ -15,9 +15,10 @@ metadata {
15
15
definition (name : " Simulated Minimote" , namespace : " smartthings/testing" , author : " SmartThings" ) {
16
16
capability " Actuator"
17
17
capability " Button"
18
+ capability " Holdable Button"
18
19
capability " Configuration"
19
20
capability " Sensor"
20
-
21
+
21
22
command " push1"
22
23
command " push2"
23
24
command " push3"
@@ -45,42 +46,42 @@ metadata {
45
46
}
46
47
standardTile(" push1" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
47
48
state " default" , label : " Push 1" , backgroundColor : " #ffffff" , action : " push1"
48
- }
49
+ }
49
50
standardTile(" push2" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
50
51
state " default" , label : " Push 2" , backgroundColor : " #ffffff" , action : " push2"
51
- }
52
+ }
52
53
standardTile(" push3" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
53
54
state " default" , label : " Push 3" , backgroundColor : " #ffffff" , action : " push3"
54
- }
55
+ }
55
56
standardTile(" push4" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
56
57
state " default" , label : " Push 4" , backgroundColor : " #ffffff" , action : " push4"
57
- }
58
+ }
58
59
standardTile(" dummy1" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
59
60
state " default" , label : " " , backgroundColor : " #ffffff" , action : " push4"
60
- }
61
+ }
61
62
standardTile(" hold1" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
62
63
state " default" , label : " Hold 1" , backgroundColor : " #ffffff" , action : " hold1"
63
- }
64
+ }
64
65
standardTile(" hold2" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
65
66
state " default" , label : " Hold 2" , backgroundColor : " #ffffff" , action : " hold2"
66
- }
67
+ }
67
68
standardTile(" dummy2" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
68
69
state " default" , label : " " , backgroundColor : " #ffffff" , action : " push4"
69
- }
70
+ }
70
71
standardTile(" hold3" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
71
72
state " default" , label : " Hold 3" , backgroundColor : " #ffffff" , action : " hold3"
72
- }
73
+ }
73
74
standardTile(" hold4" , " device.button" , width : 1 , height : 1 , decoration : " flat" ) {
74
75
state " default" , label : " Hold 4" , backgroundColor : " #ffffff" , action : " hold4"
75
- }
76
-
76
+ }
77
+
77
78
main " button"
78
79
details([" push1" ," push2" ," button" ," push3" ," push4" ," dummy1" ," hold1" ," hold2" ," dummy2" ," hold3" ," hold4" ])
79
80
}
80
81
}
81
82
82
83
def parse (String description ) {
83
-
84
+
84
85
}
85
86
86
87
def push1 () {
@@ -125,3 +126,6 @@ private hold(button) {
125
126
sendEvent(name : " button" , value : " held" , data : [buttonNumber : button], descriptionText : " $device . displayName button $button was held" , isStateChange : true )
126
127
}
127
128
129
+ def updated () {
130
+ sendEvent(name : " numberOfButtons" , value : 4 )
131
+ }
0 commit comments