Skip to content

Commit

Permalink
Added CI
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Oct 18, 2023
1 parent cf16ac4 commit 33d7ac7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ export class MatterAdapter extends utils.Adapter {
delete this.deviceObjects[device];
}
}

// for tests purposes, add the handlers
Object.keys(this.deviceObjects).forEach(device => {
this.deviceObjects[device].clearChangeHandlers();
this.deviceObjects[device].onChange((event) => {
// @ts-ignore
this.log.info(`Detected changes in "${event.property}" with value "${event.value}" in "${event.device.getDeviceType()}"`);
});
});
}
}

Expand Down

0 comments on commit 33d7ac7

Please sign in to comment.