Commands only send if the activity has already been started.
This commit is contained in:
parent
0ea4188487
commit
f0eb57e4dc
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user