This commit is contained in:
parent
34fcc1df1a
commit
d8a5e7541d
@ -2,19 +2,21 @@ import { IMatrix } from "./IMatrix";
|
||||
import { IActivity } from "./IActivity";
|
||||
import { IDeviceButton } from "./IDeviceButton";
|
||||
import { IDeviceConfig } from "./IDeviceConfig";
|
||||
import { IHub } from './IHub';
|
||||
import { IHub } from "./IHub";
|
||||
import { ISequence } from "./ISequence";
|
||||
|
||||
export interface IControlUnit {
|
||||
DisplayName: string;
|
||||
Activities: Array<IActivity>;
|
||||
DisplayName: string;
|
||||
Activities: Array<IActivity>;
|
||||
}
|
||||
|
||||
export interface IConfig {
|
||||
hubIp: string;
|
||||
EmitDevicesOnStartup: boolean;
|
||||
Matrix: IMatrix;
|
||||
ControlUnits: Array<IControlUnit>;
|
||||
DeviceButtons: Array<IDeviceButton>;
|
||||
Devices: Array<IDeviceConfig>;
|
||||
Hubs: Array<IHub>;
|
||||
}
|
||||
hubIp: string;
|
||||
EmitDevicesOnStartup: boolean;
|
||||
Matrix: IMatrix;
|
||||
ControlUnits: Array<IControlUnit>;
|
||||
DeviceButtons: Array<IDeviceButton>;
|
||||
Sequences: Array<ISequence>;
|
||||
Devices: Array<IDeviceConfig>;
|
||||
Hubs: Array<IHub>;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export class Platform implements DynamicPlatformPlugin {
|
||||
) {
|
||||
this.log.debug("Finished initializing platform:", config.name);
|
||||
|
||||
this.config = (config as unknown) as IConfig;
|
||||
this.config = config as unknown as IConfig;
|
||||
//construct data provider
|
||||
const dataProvider = new HarmonyDataProvider({
|
||||
hubs: this.config.Hubs,
|
||||
@ -70,8 +70,8 @@ export class Platform implements DynamicPlatformPlugin {
|
||||
}
|
||||
|
||||
public readonly Service: typeof Service = this.api.hap.Service;
|
||||
public readonly Characteristic: typeof Characteristic = this.api.hap
|
||||
.Characteristic;
|
||||
public readonly Characteristic: typeof Characteristic =
|
||||
this.api.hap.Characteristic;
|
||||
|
||||
// this is used to track restored cached accessories
|
||||
public readonly accessories: PlatformAccessory[] = [];
|
||||
|
Loading…
Reference in New Issue
Block a user