Update thermostat.groovy
authorRahmadi Trimananda <rahmadi.trimananda@uci.edu>
Fri, 16 Aug 2019 22:39:15 +0000 (15:39 -0700)
committerGitHub Enterprise <noreply@github.uci.edu>
Fri, 16 Aug 2019 22:39:15 +0000 (15:39 -0700)
official/thermostat.groovy

index 88501dda2631320ddd304ba28d2cd3b075d2a46b..88dd5660c0ce00ca4583ad52a61a915a0182d248 100644 (file)
@@ -76,13 +76,13 @@ def updated() {
 }
 
 def subscribeToEvents() {
-       subscribe(smokeDevices, "smoke.detected", eventHandler)
-       subscribe(smokeDevices, "smoke.tested", eventHandler)
-       subscribe(smokeDevices, "carbonMonoxide.detected", eventHandler)
-       subscribe(carbonMonoxideDevices, "carbonMonoxide.detected", eventHandler)
+       subscribe(smokeDevices, "smoke.detected", eventHandler1)
+       subscribe(smokeDevices, "smoke.tested", eventHandler1)
+       subscribe(smokeDevices, "carbonMonoxide.detected", eventHandler1)
+       subscribe(carbonMonoxideDevices, "carbonMonoxide.detected", eventHandler1)
 }
 
-def eventHandler(evt) {
+def eventHandler1(evt) {
        log.debug "Notify got evt ${evt}"
        // Turn off thermostat
        thermostatDevices*.setThermostatMode("off")