mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-02 22:04:40 +01:00
changes suggested by Tom and Zach
This commit is contained in:
@@ -119,36 +119,31 @@ private Map parseNonIasButtonMessage(Map descMap){
|
|||||||
def buttonState = ""
|
def buttonState = ""
|
||||||
def buttonNumber = 0
|
def buttonNumber = 0
|
||||||
if ((device.getDataValue("model") == "3460-L") &&(descMap.clusterInt == 0x0006)) {
|
if ((device.getDataValue("model") == "3460-L") &&(descMap.clusterInt == 0x0006)) {
|
||||||
if (descMap.command == "01") {
|
if (descMap.commandInt == 1) {
|
||||||
getButtonResult("press")
|
getButtonResult("press")
|
||||||
}
|
}
|
||||||
else if (descMap.command == "00") {
|
else if (descMap.commandInt == 0) {
|
||||||
getButtonResult("release")
|
getButtonResult("release")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((device.getDataValue("model") == "3450-L") && (descMap.clusterInt == 0x0006)) {
|
else if ((device.getDataValue("model") == "3450-L") && (descMap.clusterInt == 0x0006)) {
|
||||||
log.info "For 3450-L"
|
if (descMap.commandInt == 1) {
|
||||||
log.trace "descMap : $descMap"
|
|
||||||
if (descMap.command == "01") {
|
|
||||||
getButtonResult("press")
|
getButtonResult("press")
|
||||||
}
|
}
|
||||||
else if (descMap.command == "00") {
|
else if (descMap.commandInt == 0) {
|
||||||
def button = 1
|
def button = 1
|
||||||
switch(descMap.sourceEndpoint) {
|
switch(descMap.sourceEndpoint) {
|
||||||
case "01":
|
case "01":
|
||||||
button = 4
|
button = 4
|
||||||
break
|
break
|
||||||
case "02":
|
case "02":
|
||||||
button = 3
|
button = 3
|
||||||
break
|
break
|
||||||
case "03":
|
case "03":
|
||||||
button = 1
|
button = 1
|
||||||
break
|
break
|
||||||
case "04":
|
case "04":
|
||||||
button = 2
|
button = 2
|
||||||
break
|
|
||||||
default:
|
|
||||||
button = 1
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user