diff --git a/src/bridgeService.ts b/src/bridgeService.ts index dbcba1af4..5a7f70a7d 100644 --- a/src/bridgeService.ts +++ b/src/bridgeService.ts @@ -384,8 +384,15 @@ export class BridgeService { this.saveCachedPlatformAccessoriesOnDisk(); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars handleUpdatePlatformAccessories(accessories: PlatformAccessory[]): void { + const nonUpdatedPlugins = this.cachedPlatformAccessories.filter( + cachedPlatformAccessory => ( + accessories.find(accessory => accessory.UUID === cachedPlatformAccessory._associatedHAPAccessory.UUID) === undefined + ), + ); + + this.cachedPlatformAccessories = [ ...nonUpdatedPlugins, ...accessories]; + // Update persisted accessories this.saveCachedPlatformAccessoriesOnDisk(); }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: