Skip to content

Commit

Permalink
trying to debug addListener function
Browse files Browse the repository at this point in the history
  • Loading branch information
En3rGy committed Dec 23, 2023
1 parent eafc149 commit 2dcfdbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/hs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class HomeServerConnector {
}

if ( endpoint in this._listeners) {
this._listeners[endpoint].updateValue(value);
this._listeners[endpoint](value);
}
} else {
this.logger.info(type);
Expand Down Expand Up @@ -182,7 +182,7 @@ export class HomeServerConnector {

if (msg['type'] === 'call') {
//while (this._waitForMsg) {
// loop
// @todo do something here ###
//}
if (key in this._msgQueu[method]) {
return this._msgQueu[method][key];
Expand Down
2 changes: 1 addition & 1 deletion src/service/characteristic/On.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const addOnCharacteristic = (api: API,
const on = service.getCharacteristic(api.hap.Characteristic.On);

// @todo Implement waiting for retun value and getting it from hs.ts
hsd.addListener(async reading => {
hsd.addListener(reading => {
on.updateValue(reading.value);
}, getEndpoint);

Expand Down

0 comments on commit 2dcfdbe

Please sign in to comment.