From df9ba1bd97a0ef21c470626893c5d5ac57e3b201 Mon Sep 17 00:00:00 2001 From: Rahmadi Trimananda Date: Thu, 8 Aug 2019 09:29:06 -0700 Subject: [PATCH] Update auto-humidity-vent.groovy --- official/auto-humidity-vent.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}") } -- 2.34.1