From: Seyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Date: Sat, 10 Aug 2019 22:24:47 +0000 (-0700)
Subject: Update hue-minimote.groovy
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2fb86c9352aec263be71c027f89398e293974027;p=smartapps.git

Update hue-minimote.groovy
---

diff --git a/official/hue-minimote.groovy b/official/hue-minimote.groovy
index 5c46779..6d032a6 100644
--- a/official/hue-minimote.groovy
+++ b/official/hue-minimote.groovy
@@ -90,8 +90,8 @@ def handleButton1Pushed() {
     hueLamps.setColor(level: 100, hue: 20, saturation: 80)
     
     // notice the "?." operator - tvLights may not be set (required: false).
-    tvLights?.setColor(level: 100, hue: 100, saturation: 100)
-    otherLights?.on()
+    tvLights.setColor(level: 100, hue: 100, saturation: 100)
+    otherLights.on()
 }
 
 // turn everything off
@@ -99,8 +99,8 @@ def handleButton1Held() {
     log.debug "handleButton1Held"
     
     hueLamps.off()
-    tvLights?.off()
-    otherLights?.off()
+    tvLights.off()
+    otherLights.off()
 }
 
 // soft, dim white light
@@ -109,7 +109,7 @@ def handleButton2Pushed() {
 
     hueLamps.setColor(level: 50, hue: 20, saturation: 80)
     tvLights.setColor(level: 30, hue: 70, saturation: 70)
-    otherLights?.on()
+    otherLights.on()
 }
 
 // set to what you want!
@@ -120,8 +120,8 @@ def handleButton2Held() {
 // dim red light
 def handleButton3Pushed() {
     hueLamps.setColor(level: 40, hue: 100, saturation: 100)
-    tvLights?.setColor(level: 30, hue: 100, saturation: 100)
-    otherLights?.off()
+    tvLights.setColor(level: 30, hue: 100, saturation: 100)
+    otherLights.off()
 }
 
 // set to what you want!
@@ -134,8 +134,8 @@ def handleButton4Pushed() {
     log.debug "handleButton4Pushed"
     
     hueLamps.setColor(level: 10, hue: 70, saturation: 100)
-    tvLights?.setColor(level: 10, hue: 70, saturation: 100)
-    otherLights?.off()
+    tvLights.setColor(level: 10, hue: 70, saturation: 100)
+    otherLights.off()
 }
 
 // debug information