From: Rahmadi Trimananda Date: Thu, 8 Aug 2019 16:29:06 +0000 (-0700) Subject: Update auto-humidity-vent.groovy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=df9ba1bd97a0ef21c470626893c5d5ac57e3b201;p=smartapps.git Update auto-humidity-vent.groovy --- diff --git a/official/auto-humidity-vent.groovy b/official/auto-humidity-vent.groovy index da9ee3a..527f253 100755 --- a/official/auto-humidity-vent.groovy +++ b/official/auto-humidity-vent.groovy @@ -245,7 +245,8 @@ def set_fans(fan_state) { //TODO: How to ensure latest (most accurate) energy reading? //emeters.poll() //[configure, refresh, on, off, poll, reset] // emeters.refresh() //[configure, refresh, on, off, poll, reset] - state.fansLastRunEnergy = emeters.currentValue('energy').sum() + //state.fansLastRunEnergy = emeters.currentValue('energy').sum() + state.fansLastRunEnergy = emeters.currentValue('energy') state.fansLastRunCost = ((state.fansLastRunEnergy * price_kwh) / 100.0) send("${app.label} cycle: ${state.fansLastRunEnergy}kWh @ \$${state.fansLastRunCost}") }