X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartapps.git;a=blobdiff_plain;f=official%2Fthermostat.groovy;h=88dd5660c0ce00ca4583ad52a61a915a0182d248;hp=88501dda2631320ddd304ba28d2cd3b075d2a46b;hb=10d6e931e3bbb1f00aec5292c2295a2885a1a346;hpb=2bb8c7e5b2ce77b81559287dc1847eb7a33ef8b1 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")