Successful multi hub
This commit is contained in:
22
src/index.ts
22
src/index.ts
@@ -51,18 +51,18 @@ class HarmonyMatrixPlatform {
|
||||
if (this.config.EmitDevicesOnStartup) {
|
||||
this.dataProvider.on("Ready", () => {
|
||||
|
||||
const hubs: { [hubName: string]: { [deviceName: string]: HarmonyDevice } } = this.dataProvider!.devicesByHub;
|
||||
Object.keys(hubs).forEach((hubName: string) => {
|
||||
const deviceDictionary = hubs[hubName];
|
||||
this.log(`${hubName}`)
|
||||
// TODO const hubs: { [hubName: string]: { [deviceName: string]: HarmonyDevice } } = this.dataProvider!.devicesByHub;
|
||||
// Object.keys(hubs).forEach((hubName: string) => {
|
||||
// const deviceDictionary = hubs[hubName];
|
||||
// this.log(`${hubName}`)
|
||||
|
||||
Object.values(deviceDictionary).forEach((device: HarmonyDevice) => {
|
||||
this.log(` ${device.name} : ${device.id}`);
|
||||
Object.keys(device.commands).forEach((command: string) => {
|
||||
this.log(` ${command}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
// Object.values(deviceDictionary).forEach((device: HarmonyDevice) => {
|
||||
// this.log(` ${device.name} : ${device.id}`);
|
||||
// Object.keys(device.commands).forEach((command: string) => {
|
||||
// this.log(` ${command}`);
|
||||
// });
|
||||
// });
|
||||
// });
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user