Worked around bug where receiver was not turning off

This commit is contained in:
watsonb8
2020-01-24 23:17:33 -05:00
parent 6f7fc4c2af
commit 3ac6ffb8a3
4 changed files with 22 additions and 12 deletions

View File

@@ -49,9 +49,10 @@ class HarmonyMatrixPlatform {
});
//Emit devices if requested
if (this.config.EmitDevicesOnStartup) {
this.dataProvider.on("Ready", () => {
this.dataProvider.on("Ready", () => {
this.log("All hubs connected");
if (this.config.EmitDevicesOnStartup) {
const hubs = this.dataProvider!.hubs;
Object.values(hubs).forEach((hub: HarmonyHub) => {
const deviceDictionary = hub.devices;
@@ -64,9 +65,9 @@ class HarmonyMatrixPlatform {
});
});
});
}
});
});
}
}
}