Fixing the previous commit bugs! Adding required classes + required methods
[smartthings-infrastructure.git] / eventSimulator / eventSimulator.groovy
1 while(true) {
2         def eventNumber = Verify.getInt(0,9)
3         switch(eventNumber) {
4                 case 0:
5                         def event = Verify.getInt(0,2)
6                         if (event == 0) {
7                                         locationObject.setValue([name: "Location", value: "home", deviceId: "locationID0", descriptionText: "",
8                                                         displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
9                         } else if (event == 1) {
10                                         locationObject.setValue([name: "Location", value: "away", deviceId: "locationID0", descriptionText: "",
11                                                         displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
12                         } else {
13                                         locationObject.setValue([name: "Location", value: "night", deviceId: "locationID0", descriptionText: "",
14                                                         displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
15                         }
16                         break
17                 case 1:
18                         contactObject.setValue([name: "contact.open", value: "open", deviceId: "contactSensorID0", descriptionText: "",
19                                         displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
20                         break
21                 case 2:
22                         break
23                 case 3:
24                         break
25                 case 4:
26                         break
27                 case 5:
28                         break
29                 case 6:
30                         break
31                 case 7:
32                         break
33                 case 8:
34                         break
35                 case 9:
36                         def event = Verify.getInt(0,1)
37                         if (event == 0) {
38                                         aeonKeyFobObject.setValue([name: "button", value: "pushed", deviceId: "aeonKeyFobID0", descriptionText: "",
39                                                         displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
40                         } else {
41                                         aeonKeyFobObject.setValue([name: "button", value: "held", deviceId: "aeonKeyFobID0", descriptionText: "",
42                                                         displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
43                         }
44                         break
45         }
46 }