From: Rahmadi Trimananda Date: Fri, 16 Aug 2019 22:39:15 +0000 (-0700) Subject: Update thermostat.groovy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=314ca2bccdf85a517cd3bd3aa10a5afb6cd0238a;p=smartapps.git Update thermostat.groovy --- diff --git a/official/thermostat.groovy b/official/thermostat.groovy index 88501dd..88dd566 100644 --- a/official/thermostat.groovy +++ b/official/thermostat.groovy @@ -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")