Commit #10: more classes
[smartthings-infrastructure.git] / Alarm / Alarm.groovy
index 00f41692c270f854876cd3fe4bdcfb2a44afabda..a78c3c2877978d3c9e302d906a3e94c1ff20e0e8 100644 (file)
@@ -24,6 +24,15 @@ public class Alarm {
                this.alarmLatestValue = alarmLatestValue
        }
 
                this.alarmLatestValue = alarmLatestValue
        }
 
+       //By model checker
+       def setValue(String value) {
+               this.alarmLatestValue = alarm
+               println("the alarm with id:$id is triggered to $value!")
+               this.alarm = value
+               this.currentAlarm = value
+       }
+
+
        //By Apps
        def both() {
                println("the alarm with id:$id is changed to both!")
        //By Apps
        def both() {
                println("the alarm with id:$id is changed to both!")