From: Rahmadi Trimananda Date: Tue, 13 Aug 2019 17:30:57 +0000 (-0700) Subject: Update medicine-management-temp-motion.groovy X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=commitdiff_plain;h=13c56300d46002792c90f4c534e28e748f0d4dbb Update medicine-management-temp-motion.groovy --- diff --git a/official/medicine-management-temp-motion.groovy b/official/medicine-management-temp-motion.groovy index a047306..5ba6c97 100755 --- a/official/medicine-management-temp-motion.groovy +++ b/official/medicine-management-temp-motion.groovy @@ -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 +}