Update thermostat.groovy
authorSeyed Amir Hossein Aqajari <amiraj.95@uci.edu>
Thu, 7 Nov 2019 23:34:17 +0000 (15:34 -0800)
committerGitHub Enterprise <noreply@github.uci.edu>
Thu, 7 Nov 2019 23:34:17 +0000 (15:34 -0800)
official/thermostat.groovy

index 88501dd..88dd566 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")