mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-05 22:04:50 +01:00
EX-45: Wemo (Connect) device addition fails on update for old devices that lack MAC in device data
This commit is contained in:
@@ -234,7 +234,7 @@ def addSwitches() {
|
|||||||
def d
|
def d
|
||||||
if (selectedSwitch) {
|
if (selectedSwitch) {
|
||||||
d = getChildDevices()?.find {
|
d = getChildDevices()?.find {
|
||||||
it.dni == selectedSwitch.value.mac || it.device.getDataValue("mac") == selectedSwitch.value.mac
|
it.deviceNetworkId == selectedSwitch.value.mac || it.device.getDataValue("mac") == selectedSwitch.value.mac
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -265,7 +265,7 @@ def addMotions() {
|
|||||||
def d
|
def d
|
||||||
if (selectedMotion) {
|
if (selectedMotion) {
|
||||||
d = getChildDevices()?.find {
|
d = getChildDevices()?.find {
|
||||||
it.dni == selectedMotion.value.mac || it.device.getDataValue("mac") == selectedMotion.value.mac
|
it.deviceNetworkId == selectedMotion.value.mac || it.device.getDataValue("mac") == selectedMotion.value.mac
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,7 +296,7 @@ def addLightSwitches() {
|
|||||||
def d
|
def d
|
||||||
if (selectedLightSwitch) {
|
if (selectedLightSwitch) {
|
||||||
d = getChildDevices()?.find {
|
d = getChildDevices()?.find {
|
||||||
it.dni == selectedLightSwitch.value.mac || it.device.getDataValue("mac") == selectedLightSwitch.value.mac
|
it.deviceNetworkId == selectedLightSwitch.value.mac || it.device.getDataValue("mac") == selectedLightSwitch.value.mac
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user