Fixed device buttons

This commit is contained in:
watsonb8
2020-01-24 21:47:13 -05:00
parent 97c0f625db
commit 6f7fc4c2af
4 changed files with 61 additions and 52 deletions

View File

@ -10,17 +10,23 @@ export class HarmonyHub extends EventEmitter {
private _ip: string;
private _harmony: any;
private _log: any;
private _name: string;
constructor(ipAddress: string, log: any) {
constructor(hubName: string, ipAddress: string, log: any) {
super();
this._ip = ipAddress;
this._log = log;
this._name = hubName;
}
public get devices(): { [deviceName: string]: HarmonyDevice } {
return this._devices;
}
public get hubName(): string {
return this._name;
}
public getDeviceByName = (deviceName: string): HarmonyDevice => {
return this._devices[deviceName];
}