@hernas/homebridge-panasonic-heat-pump
Advanced tools
Comparing version 1.6.1 to 1.6.2
@@ -52,2 +52,3 @@ "use strict"; | ||
} | ||
const foundAccessoriesUUIDs = []; | ||
for (const device of devices) { | ||
@@ -58,2 +59,3 @@ for (const type of Object.keys(types_1.accessoryTypeClases)) { | ||
const existingAccessory = this.cachedAccessories.find(accessory => accessory.UUID === uuid); | ||
foundAccessoriesUUIDs.push(uuid); | ||
if (!this.config.enableOutdoorTempSensor && type === types_1.AccessoryType.Thermometer) { | ||
@@ -89,2 +91,9 @@ if (existingAccessory) { | ||
} | ||
for (const cachedAccessory of this.cachedAccessories) { | ||
if (foundAccessoriesUUIDs.includes(cachedAccessory.UUID)) { | ||
continue; | ||
} | ||
this.log.info('Removing non-existing accessory:', cachedAccessory.displayName); | ||
this.api.unregisterPlatformAccessories(settings_1.PLUGIN_NAME, settings_1.PLATFORM_NAME, [cachedAccessory]); | ||
} | ||
} | ||
@@ -91,0 +100,0 @@ async fetchDevices() { |
{ | ||
"displayName": "Homebridge Panasonic Heat Pump", | ||
"name": "@hernas/homebridge-panasonic-heat-pump", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "Allows basic control of Panasonic Heat Pump (AQUAREA)", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115470
1191