mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-19 06:13:06 +01:00
SHARD-159: Wemo (Connect) updated() fails in certain IP change scenarios
This commit is contained in:
@@ -236,8 +236,6 @@ def addSwitches() {
|
||||
d = getChildDevices()?.find {
|
||||
it.deviceNetworkId == selectedSwitch.value.mac || it.device.getDataValue("mac") == selectedSwitch.value.mac
|
||||
}
|
||||
}
|
||||
|
||||
if (!d) {
|
||||
log.debug "Creating WeMo Switch with dni: ${selectedSwitch.value.mac}"
|
||||
d = addChildDevice("smartthings", "Wemo Switch", selectedSwitch.value.mac, selectedSwitch?.value.hub, [
|
||||
@@ -256,6 +254,7 @@ def addSwitches() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def addMotions() {
|
||||
def motions = getWemoMotions()
|
||||
@@ -267,8 +266,6 @@ def addMotions() {
|
||||
d = getChildDevices()?.find {
|
||||
it.deviceNetworkId == selectedMotion.value.mac || it.device.getDataValue("mac") == selectedMotion.value.mac
|
||||
}
|
||||
}
|
||||
|
||||
if (!d) {
|
||||
log.debug "Creating WeMo Motion with dni: ${selectedMotion.value.mac}"
|
||||
d = addChildDevice("smartthings", "Wemo Motion", selectedMotion.value.mac, selectedMotion?.value.hub, [
|
||||
@@ -287,6 +284,7 @@ def addMotions() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def addLightSwitches() {
|
||||
def lightSwitches = getWemoLightSwitches()
|
||||
@@ -298,8 +296,6 @@ def addLightSwitches() {
|
||||
d = getChildDevices()?.find {
|
||||
it.deviceNetworkId == selectedLightSwitch.value.mac || it.device.getDataValue("mac") == selectedLightSwitch.value.mac
|
||||
}
|
||||
}
|
||||
|
||||
if (!d) {
|
||||
log.debug "Creating WeMo Light Switch with dni: ${selectedLightSwitch.value.mac}"
|
||||
d = addChildDevice("smartthings", "Wemo Light Switch", selectedLightSwitch.value.mac, selectedLightSwitch?.value.hub, [
|
||||
@@ -318,6 +314,7 @@ def addLightSwitches() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def ssdpSwitchHandler(evt) {
|
||||
def description = evt.description
|
||||
|
||||
Reference in New Issue
Block a user