From f166d213909232d4e1ea9f5cf67de5e412f3cc35 Mon Sep 17 00:00:00 2001 From: Jc2k Date: Thu, 25 Aug 2022 16:22:58 +0100 Subject: [PATCH] Fix characteristic cache clear in homekit_controller on BLE unpair (#77309) --- homeassistant/components/homekit_controller/__init__.py | 7 +------ homeassistant/components/homekit_controller/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/homekit_controller/__init__.py b/homeassistant/components/homekit_controller/__init__.py index 9b431b09c9e..dca626d2abd 100644 --- a/homeassistant/components/homekit_controller/__init__.py +++ b/homeassistant/components/homekit_controller/__init__.py @@ -20,8 +20,7 @@ from homeassistant.helpers.typing import ConfigType from .config_flow import normalize_hkid from .connection import HKDevice -from .const import ENTITY_MAP, KNOWN_DEVICES, TRIGGERS -from .storage import EntityMapStorage +from .const import KNOWN_DEVICES, TRIGGERS from .utils import async_get_controller _LOGGER = logging.getLogger(__name__) @@ -83,10 +82,6 @@ async def async_remove_entry(hass: HomeAssistant, entry: ConfigEntry) -> None: """Cleanup caches before removing config entry.""" hkid = entry.data["AccessoryPairingID"] - # Remove cached type data from .storage/homekit_controller-entity-map - entity_map_storage: EntityMapStorage = hass.data[ENTITY_MAP] - entity_map_storage.async_delete_map(hkid) - controller = await async_get_controller(hass) # Remove the pairing on the device, making the device discoverable again. diff --git a/homeassistant/components/homekit_controller/manifest.json b/homeassistant/components/homekit_controller/manifest.json index 143627fe7f0..10b3cb4cbb5 100644 --- a/homeassistant/components/homekit_controller/manifest.json +++ b/homeassistant/components/homekit_controller/manifest.json @@ -3,7 +3,7 @@ "name": "HomeKit Controller", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/homekit_controller", - "requirements": ["aiohomekit==1.4.0"], + "requirements": ["aiohomekit==1.5.0"], "zeroconf": ["_hap._tcp.local.", "_hap._udp.local."], "bluetooth": [{ "manufacturer_id": 76, "manufacturer_data_start": [6] }], "dependencies": ["bluetooth", "zeroconf"], diff --git a/requirements_all.txt b/requirements_all.txt index 01edbe8d47a..44c957a9fba 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -168,7 +168,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.4.0 +aiohomekit==1.5.0 # homeassistant.components.emulated_hue # homeassistant.components.http diff --git a/requirements_test_all.txt b/requirements_test_all.txt index cc4030baf39..e0b8f21d3f3 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -152,7 +152,7 @@ aioguardian==2022.07.0 aioharmony==0.2.9 # homeassistant.components.homekit_controller -aiohomekit==1.4.0 +aiohomekit==1.5.0 # homeassistant.components.emulated_hue # homeassistant.components.http