f3f944a4276bda5a8be610a018e2de54a8bc38c0
[smartthings-infrastructure.git] / GlobalVariables / GlobalVariablesBothApps.groovy
1 //Create a global variable for send event
2 @Field def sendEvent = {eventDataMap -> 
3                         eventHandler(eventDataMap)
4                         }
5 //Object for location
6 @Field def locationObject = new LocationVar(sendEvent)
7 //Object for touch to call function
8 @Field def appObject = new Touched(sendEvent, 0)
9 //Create a global list for events
10 //@Field def evt = []
11 //Global Object for class Touch Sensor!
12 @Field def touchSensorObject = new NfcTouch(sendEvent, 1)
13 //Global Object for class switch!
14 @Field def switchObject = new Switches(sendEvent, 1)
15 //Global Object for class lock!
16 @Field def lockObject = new Locks(sendEvent, 1)
17 //Global Object for class door control!
18 @Field def doorControlObject = new DoorControls(sendEvent, 1)
19 //Global Object for class contact sensor!
20 @Field def contactObject = new ContactSensors(sendEvent, 1)
21 //Global Object for class presence sensor!
22 @Field def presenceSensorObject = new PresenceSensors(sendEvent, 1)
23 //Global Object for class thermostat!
24 @Field def thermostatObject = new Thermostats(sendEvent, 1)
25 //Global Object for class aeon key fob!
26 @Field def aeonKeyFobObject = new AeonKeyFobs(sendEvent, 1)
27 //Global Object for class music player!
28 @Field def musicPlayerObject = new MusicPlayers(sendEvent, 1)
29 //Global Object for class motion sensor!
30 @Field def motionSensorObject = new MotionSensors(sendEvent, 1)
31 //Global Object for class image capture!
32 @Field def imageCaptureObject = new ImageCaptures(sendEvent, 1)
33 //Global Object for class smoke detector!
34 @Field def smokeDetectorObject = new SmokeDetectors(sendEvent, 1)
35 //Global Object for class alarm!
36 @Field def alarmObject = new Alarms(sendEvent, 1)
37 //Global Object for class speech synthesis!
38 @Field def speechSynthesisObject = new SpeechSynthesises(sendEvent, 1)
39 //Global Object for class acceleration sensor!
40 @Field def accelerationSensorObject = new AccelerationSensors(sendEvent, 1)
41 //Global Object for class Battery!
42 @Field def batteryObject = new Batteries(sendEvent, 1)
43 //Global Object for class beacon sensor!
44 @Field def beaconSensorObject = new BeaconSensors(sendEvent, 1)
45 //Global Object for class carbon monoxide!
46 @Field def carbonMonoxideDetectorObject = new CarbonMonoxideDetectors(sendEvent, 1)
47 //Global Object for class color control!
48 @Field def colorControlObject = new ColorControls(sendEvent, 1)
49 //Global Object for class energy meter!
50 @Field def energyMeterObject = new EnergyMeters(sendEvent, 1)