Fixing some bugs
[smartthings-infrastructure.git] / Event / Event.groovy
index eecbc7bda63fbbbee31a5e79751601f08e328cb0..7e834345ac2da8b4b09f47427e99c6f8e806cf4f 100644 (file)
@@ -18,6 +18,8 @@ public class Event {
        private double doubleValue
        private List integerValues = ["battery", "hue", "saturation", "energy", "level", "temperature", 
                                      "heatingSetpoint", "coolingSetpoint", "thermostatSetpoint", "illuminance"]
        private double doubleValue
        private List integerValues = ["battery", "hue", "saturation", "energy", "level", "temperature", 
                                      "heatingSetpoint", "coolingSetpoint", "thermostatSetpoint", "illuminance"]
+       private boolean physical
+       private def date
        
        Event(String value, String name, String deviceId, String descriptionText, boolean displayed, String linkText, String displayName, boolean isStateChange, String unit, String data) {
                this.deviceId = deviceId
        
        Event(String value, String name, String deviceId, String descriptionText, boolean displayed, String linkText, String displayName, boolean isStateChange, String unit, String data) {
                this.deviceId = deviceId
@@ -35,5 +37,7 @@ public class Event {
                        this.integerValue = value.toInteger()
                        this.doubleValue = Double.parseDouble(value);           
                }
                        this.integerValue = value.toInteger()
                        this.doubleValue = Double.parseDouble(value);           
                }
+               this.physical = true
+               this.date = new Date()
        }
 }
        }
 }