diff --git a/src/@types/homebridge-lib.d.ts b/src/@types/homebridge-lib.d.ts index 136c519..f19366a 100644 --- a/src/@types/homebridge-lib.d.ts +++ b/src/@types/homebridge-lib.d.ts @@ -1,8 +1,11 @@ declare module 'homebridge-lib/EveHomeKitTypes' { export class EveHomeKitTypes { + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(homebridge: any); + // eslint-disable-next-line @typescript-eslint/no-explicit-any Characteristics: Record; + // eslint-disable-next-line @typescript-eslint/no-explicit-any Services: Record; } } diff --git a/src/platform.ts b/src/platform.ts index c274385..3e1c27d 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -19,7 +19,10 @@ export class ExampleHomebridgePlatform implements DynamicPlatformPlugin { public readonly accessories: Map = new Map(); public readonly discoveredCacheUUIDs: string[] = []; + // This is only required when using Custom Services and Characteristics not support by HomeKit + // eslint-disable-next-line @typescript-eslint/no-explicit-any public readonly CustomServices: any; + // eslint-disable-next-line @typescript-eslint/no-explicit-any public readonly CustomCharacteristics: any; constructor( diff --git a/src/platformAccessory.ts b/src/platformAccessory.ts index 9634978..3d76012 100644 --- a/src/platformAccessory.ts +++ b/src/platformAccessory.ts @@ -34,7 +34,8 @@ export class ExamplePlatformAccessory { if (accessory.context.device.CustomService) { // This is only required when using Custom Services and Characteristics not support by HomeKit - this.service = this.accessory.getService(this.platform.CustomServices[accessory.context.device.CustomService]) || this.accessory.addService(this.platform.CustomServices[accessory.context.device.CustomService]); + this.service = this.accessory.getService(this.platform.CustomServices[accessory.context.device.CustomService]) || + this.accessory.addService(this.platform.CustomServices[accessory.context.device.CustomService]); this.platform.log.debug('this.service', this.service); } else { this.service = this.accessory.getService(this.platform.Service.Lightbulb) || this.accessory.addService(this.platform.Service.Lightbulb);