diff --git a/src/DataProviders/HarmonyDataProvider.ts b/src/DataProviders/HarmonyDataProvider.ts index 75b1012..0b34624 100644 --- a/src/DataProviders/HarmonyDataProvider.ts +++ b/src/DataProviders/HarmonyDataProvider.ts @@ -221,6 +221,12 @@ class HarmonyDataProvider { public sendKeyPress = async (controlUnitName: string, key: any) => { if (this.states[controlUnitName]) { let commandName: string = ""; + + //Ignore commands unless the tv is already on + if (!this.states[controlUnitName]!.currentActivity) { + return; + } + let device: IDevice = this.getDeviceFromName(this.states[controlUnitName]!.currentActivity.controlDeviceId); switch (key) { case RemoteKey.ARROW_UP: {