Infrastructure now works for: locks, alarms, thermostats, and non-hue lights.
[smartthings-infrastructure.git] / Event / Event.groovy
index 816ea92a584c4c8870b3d9cf4543043ca27a456e..60d7276f7ce4ad7e46452daaad4d70a198e81341 100644 (file)
@@ -13,6 +13,7 @@ public class Event {
        private String unit
        private String data
        private int integerValue
+       private double doubleValue
        private List integerValues = ["battery", "hue", "saturation", "energy", "level", "temperature", 
                                      "heatingSetpoint", "coolingSetpoint", "thermostatSetpoint", "illuminance"]
        
@@ -27,7 +28,9 @@ public class Event {
                this.unit = unit
                this.data = data
                this.displayed = displayed
-               if (integerValues.contains(name))
+               if (integerValues.contains(name)) {
                        this.integerValue = value.toInteger()
+                       this.doubleValue = Double.parseDouble(value);           
+               }
        }
 }