Update greetings-earthling.groovy
authorRahmadi Trimananda <rahmadi.trimananda@uci.edu>
Sun, 11 Aug 2019 15:51:47 +0000 (08:51 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Sun, 11 Aug 2019 15:51:47 +0000 (08:51 -0700)
official/greetings-earthling.groovy

index e97c684087dd36284dbe336de042a17786b2fc2b..dec848b274d4bc06e2023136b0206fe55b23153f 100755 (executable)
@@ -71,7 +71,9 @@ def presence(evt)
                        def person = getPerson(evt)
                        def recentNotPresent = person.statesSince("presence", t0).find{it.value == "not present"}
                        if (recentNotPresent) {
                        def person = getPerson(evt)
                        def recentNotPresent = person.statesSince("presence", t0).find{it.value == "not present"}
                        if (recentNotPresent) {
-                               log.debug "skipping notification of arrival of Person because last departure was only ${now() - recentNotPresent.date.time} msec ago"
+                               //log.debug "skipping notification of arrival of Person because last departure was only ${now() - recentNotPresent.date.time} msec ago"
+                               // Commenting this out since there could be a null value error
+                               log.debug "skipping notification of arrival of Person"
                        }
                        else {
                                def message = "${person.displayName} arrived at home, changing mode to '${newMode}'"
                        }
                        else {
                                def message = "${person.displayName} arrived at home, changing mode to '${newMode}'"