From 27ef8a1ced83b83c23f7189120c4083e93e48686 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 6 Jul 2020 19:27:25 -0500 Subject: [PATCH] Ensure homekit accessory reset only affect the bridges with the accessory (#37588) --- homeassistant/components/homekit/__init__.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/homekit/__init__.py b/homeassistant/components/homekit/__init__.py index eef7ae88656..494daa54b23 100644 --- a/homeassistant/components/homekit/__init__.py +++ b/homeassistant/components/homekit/__init__.py @@ -416,12 +416,21 @@ class HomeKit: for entity_id in entity_ids: aid = aid_storage.get_or_allocate_aid_for_entity_id(entity_id) if aid not in self.bridge.accessories: - _LOGGER.warning( - "Could not reset accessory. entity_id not found %s", entity_id - ) continue + + _LOGGER.info( + "HomeKit Bridge %s will reset accessory with linked entity_id %s", + self._name, + entity_id, + ) + acc = self.remove_bridge_accessory(aid) removed.append(acc) + + if not removed: + # No matched accessories, probably on another bridge + return + self.driver.config_changed() for acc in removed: