Skip to content

Commit 098d2b9

Browse files
committed
issue #72 helper
1 parent 36ca278 commit 098d2b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/eWeLink.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ class eWeLink {
101101
}
102102
//*** Synchronise (add/refresh) devices between eWeLink and Homebridge ***\\
103103
this.devicesInEwe.forEach(device => {
104-
this.initialiseDevice(device);
104+
if (device.hasOwnProperty("extra") && device.extra.hasOwnProperty("uiid")) {
105+
this.initialiseDevice(device);
106+
} else {
107+
let deviceName = device.hasOwnProperty("name") ? device.name : "Unknown Device";
108+
this.log.warn("[%s] could not be synchronised due to missing uiid parameter.", deviceName);
109+
}
105110
});
106111
//*** Set up the ws listener for future external device updates ***\\
107112
this.wsClient.receiveUpdate(device => {

0 commit comments

Comments
 (0)