mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-28 13:23:07 +00:00
Merge branch 'master' into staging
This commit is contained in:
@@ -722,6 +722,11 @@ private getBridgeIP() {
|
|||||||
if (host == null || host == "") {
|
if (host == null || host == "") {
|
||||||
def serialNumber = selectedHue
|
def serialNumber = selectedHue
|
||||||
def bridge = getHueBridges().find { it?.value?.serialNumber?.equalsIgnoreCase(serialNumber) }?.value
|
def bridge = getHueBridges().find { it?.value?.serialNumber?.equalsIgnoreCase(serialNumber) }?.value
|
||||||
|
if (!bridge) {
|
||||||
|
//failed because mac address sent from hub is wrong and doesn't match the hue's real mac address and serial number
|
||||||
|
//in this case we will look up the bridge by comparing the incorrect mac addresses
|
||||||
|
bridge = getHueBridges().find { it?.value?.mac?.equalsIgnoreCase(serialNumber) }?.value
|
||||||
|
}
|
||||||
if (bridge?.ip && bridge?.port) {
|
if (bridge?.ip && bridge?.port) {
|
||||||
if (bridge?.ip.contains("."))
|
if (bridge?.ip.contains("."))
|
||||||
host = "${bridge?.ip}:${bridge?.port}"
|
host = "${bridge?.ip}:${bridge?.port}"
|
||||||
|
|||||||
Reference in New Issue
Block a user