From 97bfe61baa464cdac8894a566f19bcd6cc3c68c7 Mon Sep 17 00:00:00 2001 From: Zach Varberg Date: Fri, 14 Jul 2017 10:08:44 -0500 Subject: [PATCH] Update ranges for centralite battery values This just updates the range to be more conservative as well as match the battery curve better. --- .../smartsense-motion-sensor.groovy | 4 ++-- .../smartsense-multi-sensor.groovy | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy index 336c31e..c00e65e 100644 --- a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy +++ b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy @@ -171,8 +171,8 @@ private Map getBatteryResult(rawValue) { def pct = batteryMap[volts] result.value = pct } else { - def minVolts = 2.1 - def maxVolts = 3.0 + def minVolts = 2.4 + def maxVolts = 2.7 def pct = (volts - minVolts) / (maxVolts - minVolts) def roundedPct = Math.round(pct * 100) if (roundedPct <= 0) diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy index e6978b8..a8d436e 100644 --- a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy @@ -274,7 +274,7 @@ private Map getBatteryResult(rawValue) { result.value = pct } else { def minVolts = 2.1 - def maxVolts = 3.0 + def maxVolts = 2.7 def pct = (volts - minVolts) / (maxVolts - minVolts) def roundedPct = Math.round(pct * 100) if (roundedPct <= 0)