Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NorthernMan54 committed Dec 6, 2024
1 parent d115946 commit 1bfcbaa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/@types/homebridge-lib.d.ts
Original file line number Diff line number Diff line change
@@ -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<string, any>;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Services: Record<string, any>;
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export class ExampleHomebridgePlatform implements DynamicPlatformPlugin {
public readonly accessories: Map<string, PlatformAccessory> = 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(
Expand Down
3 changes: 2 additions & 1 deletion src/platformAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1bfcbaa

Please sign in to comment.