Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
fix: emit status on Homebridge boot (thanks @jeffmaki!)
Browse files Browse the repository at this point in the history
part of #40

fixes #18
  • Loading branch information
sman591 committed Apr 20, 2021
1 parent 226f2a5 commit 97bfbc5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ export class HomebridgeLgThinqPlatform implements DynamicPlatformPlugin {
configureAccessory(accessory: PlatformAccessory) {
this.log.debug('Restoring accessory from cache:', accessory.displayName)

// create the accessory handler
// this is imported from `platformAccessory.ts`
new LgAirConditionerPlatformAccessory(this, accessory)

// add the restored accessory to the accessories cache so we can track if it has already been registered
this.accessories.push(accessory)
}
Expand Down Expand Up @@ -237,6 +233,7 @@ export class HomebridgeLgThinqPlatform implements DynamicPlatformPlugin {
for (const accessory of matchingAccessories) {
accessory.context.device = device
matchedAccessories.push(accessory)
new LgAirConditionerPlatformAccessory(this, accessory)
}
} else {
this.log.info('Registering new accessory:', device.alias)
Expand Down

0 comments on commit 97bfbc5

Please sign in to comment.