Merge branch 'master' into staging

This commit is contained in:
bflorian
2015-11-04 09:41:38 -08:00
4 changed files with 2 additions and 3 deletions

View File

@@ -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"
}

View File

@@ -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) {