Check if only sent mode is different with current mode, send event in Location class!
[smartthings-infrastructure.git] / WaterSensor / WaterSensor.groovy
1 //Create a class for water sensor
2 package WaterSensor
3 import Timer.SimulatedTimer
4
5 public class WaterSensor {
6         private String id
7         private String label
8         private String displayName
9         private String water
10
11         WaterSensor(String id, String label, String displayName, String water) {
12                 this.id = id
13                 this.label = label
14                 this.displayName = displayName
15                 this.water = water
16         }
17
18         //By Model Checker
19         def setValue(String value) {
20                 println("the water state is changed to $value!")
21                 this.water = value
22         }
23 }