multi: ignore attribute reports that don't include all three axis

Resolves:
    https://smartthings.atlassian.net/browse/DVCSMP-1366
This commit is contained in:
Tom Manley
2015-12-31 11:13:41 -06:00
parent f12684565c
commit 837d2d0cfd

View File

@@ -204,8 +204,10 @@ private List parseReportAttributeMessage(String description) {
}
result << getAccelerationResult(descMap.value)
}
else if (descMap.cluster == "FC02" && descMap.attrId == "0012") {
result << parseAxis(descMap.value)
else if (descMap.cluster == "FC02" && descMap.attrId == "0012" && descMap.value.size() == 24) {
// The size is checked to ensure the attribute report contains X, Y and Z values
// If all three axis are not included then the attribute report is ignored
result << parseAxis(descMap.value)
}
else if (descMap.cluster == "0001" && descMap.attrId == "0020") {
result << getBatteryResult(Integer.parseInt(descMap.value, 16))