From 85294a680b6738dbae47d4b0ac6e6ba38a446d0e Mon Sep 17 00:00:00 2001 From: Just Jam Date: Sun, 5 Jan 2025 23:30:48 +0000 Subject: [PATCH 1/3] Fixed method handleUpdatePlatformAccessories() --- src/bridgeService.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bridgeService.ts b/src/bridgeService.ts index dbcba1af4..a691c991c 100644 --- a/src/bridgeService.ts +++ b/src/bridgeService.ts @@ -386,6 +386,14 @@ export class BridgeService { // 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(); } From 3fcdf7385e165bc42284a9c6262081a1e0d914ce Mon Sep 17 00:00:00 2001 From: Just Jam Date: Sun, 5 Jan 2025 23:40:37 +0000 Subject: [PATCH 2/3] Fixed filter matching condition and removed lint annotation --- src/bridgeService.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/bridgeService.ts b/src/bridgeService.ts index a691c991c..3a8bde4fe 100644 --- a/src/bridgeService.ts +++ b/src/bridgeService.ts @@ -384,11 +384,10 @@ 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 + accessories.find(accessory => accessory.UUID === cachedPlatformAccessory._associatedHAPAccessory.UUID) === undefined ) ); From 93386f24dfca6e49362baceecfccc42f14d2db8f Mon Sep 17 00:00:00 2001 From: Donavan Becker Date: Sat, 18 Jan 2025 09:07:44 -0600 Subject: [PATCH 3/3] Update bridgeService.ts --- src/bridgeService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bridgeService.ts b/src/bridgeService.ts index 3a8bde4fe..5a7f70a7d 100644 --- a/src/bridgeService.ts +++ b/src/bridgeService.ts @@ -388,7 +388,7 @@ export class BridgeService { const nonUpdatedPlugins = this.cachedPlatformAccessories.filter( cachedPlatformAccessory => ( accessories.find(accessory => accessory.UUID === cachedPlatformAccessory._associatedHAPAccessory.UUID) === undefined - ) + ), ); this.cachedPlatformAccessories = [ ...nonUpdatedPlugins, ...accessories]; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy