Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
typo in variable name
  • Loading branch information
snowdd1 committed Feb 7, 2020
1 parent 5f51800 commit 20a6755
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,24 +232,22 @@ KNXPlatform.prototype.configure = function() {


// here needs the hook for global "finished" event to go into

for (var i = 0; i < globs.devices.length; i++) {
matchAcc = globs.devices[i];
for (var i_serv = 0; i_serv < matchAcc.services.length; i_serv++) {
var myKNXService = matchAcc.services[i_serv];
let matchAcc2 = globs.devices[i];
for (var i_serv = 0; i_serv < matchAcc2.services.length; i_serv++) {
var myKNXService = matchAcc2.services[i_serv];
if (myKNXService.customServiceAPI && myKNXService.customServiceAPI.handler) {
if (typeof myKNXService.customServiceAPI.handler.onHomeKitReady === 'function') {
this.globs.debug(matchAcc.name + "/" + myKNXService.name +": Custom Handler onHomeKitReady()");
globs.debug(matchAcc2.name + "/" + myKNXService.name +": Custom Handler onHomeKitReady()");
myKNXService.customServiceAPI.handler.onHomeKitReady();
}
}
}

}

//TODO: Inform all devices that homekit has now finished loading



/*********************************************************************************/
// start the tiny web server for deleting orphaned devices
globs.debug('BEFORE http.createServer');
Expand Down

0 comments on commit 20a6755

Please sign in to comment.