Update medicine-management-temp-motion.groovy
authorRahmadi Trimananda <rahmadi.trimananda@uci.edu>
Tue, 13 Aug 2019 17:30:57 +0000 (10:30 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Tue, 13 Aug 2019 17:30:57 +0000 (10:30 -0700)
official/medicine-management-temp-motion.groovy

index a0473060a495f9577a76bd9e3d46df645e4da288..5ba6c97930574b2e8775880a5e13c51f5e63ee16 100755 (executable)
@@ -180,10 +180,11 @@ def resetLEDNotification(){
 
     // return color to original
     log.debug "Reset LED color to: $state.origColor"
-    deviceLight.setHue(state.origColor)
+    if (state.origColor != null)
+       deviceLight.setHue(state.origColor)
     
     // if the light was turned on just for the notification, turn it back off now
     if (state.ledState == "off") {
        deviceLight.off()
     }
-}
\ No newline at end of file
+}