From 2d22b5a384a7e747e45dd6b9b48076100930927f Mon Sep 17 00:00:00 2001 From: Tom Manley Date: Mon, 2 Nov 2015 09:51:03 -0600 Subject: [PATCH 1/3] Fix 'Low Battery Handler' exception caused by non-integer battery events ZigBee locks report battery percentage remaining in .5% increments. However the Low Battery Handler Smart App in Hello Home expects it to be an integer. --- devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy b/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy index 20384e2..0e46ebf 100644 --- a/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy +++ b/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy @@ -139,8 +139,7 @@ private Map parseReportAttributeMessage(String description) { Map resultMap = [:] if (descMap.clusterInt == CLUSTER_POWER && descMap.attrInt == POWER_ATTR_BATTERY_PERCENTAGE_REMAINING) { resultMap.name = "battery" - // BatteryPercentageRemaining is specified in .5% increments - resultMap.value = Integer.parseInt(descMap.value, 16) / 2 + resultMap.value = Math.round(Integer.parseInt(descMap.value, 16) / 2) log.info "parseReportAttributeMessage() --- battery: ${resultMap.value}" } else if (descMap.clusterInt == CLUSTER_DOORLOCK && descMap.attrInt == DOORLOCK_ATTR_LOCKSTATE) { From f337e8a085ef86ce73d720bf91e12046ddd8237c Mon Sep 17 00:00:00 2001 From: bflorian Date: Tue, 3 Nov 2015 17:55:11 -0800 Subject: [PATCH 2/3] Corrected filename of Z-Wave Device Multichannel --- .../zwave-device-multichannel.groovy} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename devicetypes/smartthings/{zwave-device-mc.src/zwave-device-mc.groovy => zwave-device-multichannel.src/zwave-device-multichannel.groovy} (100%) diff --git a/devicetypes/smartthings/zwave-device-mc.src/zwave-device-mc.groovy b/devicetypes/smartthings/zwave-device-multichannel.src/zwave-device-multichannel.groovy similarity index 100% rename from devicetypes/smartthings/zwave-device-mc.src/zwave-device-mc.groovy rename to devicetypes/smartthings/zwave-device-multichannel.src/zwave-device-multichannel.groovy From d830c1fae084b6ac8ccecb4c9a068c08b6f75b5c Mon Sep 17 00:00:00 2001 From: bflorian Date: Tue, 3 Nov 2015 18:08:51 -0800 Subject: [PATCH 3/3] Filename corrections --- .../aeon-led-bulb.groovy} | 0 .../simulated-color-control.src/simulated-color-control.groovy | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename devicetypes/smartthings/{aeon-rgbw-bulb.src/aeon-rgbw-bulb.groovy => aeon-led-bulb.src/aeon-led-bulb.groovy} (100%) diff --git a/devicetypes/smartthings/aeon-rgbw-bulb.src/aeon-rgbw-bulb.groovy b/devicetypes/smartthings/aeon-led-bulb.src/aeon-led-bulb.groovy similarity index 100% rename from devicetypes/smartthings/aeon-rgbw-bulb.src/aeon-rgbw-bulb.groovy rename to devicetypes/smartthings/aeon-led-bulb.src/aeon-led-bulb.groovy diff --git a/devicetypes/smartthings/testing/simulated-color-control.src/simulated-color-control.groovy b/devicetypes/smartthings/testing/simulated-color-control.src/simulated-color-control.groovy index 5f33a03..f32fa5c 100644 --- a/devicetypes/smartthings/testing/simulated-color-control.src/simulated-color-control.groovy +++ b/devicetypes/smartthings/testing/simulated-color-control.src/simulated-color-control.groovy @@ -1,5 +1,5 @@ metadata { - definition (name: "Color Control Capability", namespace: "capabilities", author: "SmartThings") { + definition (name: "Simulated Color Control", namespace: "smartthings/testing", author: "SmartThings") { capability "Color Control" }