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