diff --git a/lib/NbPlatform.js b/lib/NbPlatform.js index 82fc6d6..57a15a1 100644 --- a/lib/NbPlatform.js +++ b/lib/NbPlatform.js @@ -84,18 +84,21 @@ class NbPlatform extends homebridgeLib.Platform { const jobs = [] for (const bridge of bridges) { jobs.push(this.foundBridge(beat, bridge)) - for (const job of jobs) { - try { - await job - } catch (error) { - this.warn(error) - } + } + for (const job of jobs) { + try { + await job + } catch (error) { + this.warn(error) } } } } async foundBridge (beat, bridge) { + if (bridge.ip == null || bridge.port == null) { + return + } const id = bridge.bridgeId.toString(16).toUpperCase() if (this.bridges[id] == null) { const name = 'Bridge_' + id