Infrastructure that works for all the locks' group!
[smartthings-infrastructure.git] / SpeechSynthesis / SpeechSynthesis.groovy
index a13e7f7a0ee5ab5378637350cb92a19b925829db..acc2d80545cee93895eeb840085192cddb4da16c 100644 (file)
@@ -17,8 +17,10 @@ public class SpeechSynthesis {
        }
 
        def setLevel(int level) {
-               println("The level of speech synthesis with id:$id is changed to $level")
-               this.level = level
+               if (level != this.level) {
+                       println("The level of speech synthesis with id:$id is changed to $level")
+                       this.level = level
+               }
        }
 
        def speak(String message) {