mirror of
https://github.com/home-assistant/core.git
synced 2025-06-06 14:17:06 +00:00
Ensure homekit accessory reset only affect the bridges with the accessory (#37588)
This commit is contained in:
parent
bea3d841d2
commit
27ef8a1ced
@ -416,12 +416,21 @@ class HomeKit:
|
|||||||
for entity_id in entity_ids:
|
for entity_id in entity_ids:
|
||||||
aid = aid_storage.get_or_allocate_aid_for_entity_id(entity_id)
|
aid = aid_storage.get_or_allocate_aid_for_entity_id(entity_id)
|
||||||
if aid not in self.bridge.accessories:
|
if aid not in self.bridge.accessories:
|
||||||
_LOGGER.warning(
|
|
||||||
"Could not reset accessory. entity_id not found %s", entity_id
|
|
||||||
)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
_LOGGER.info(
|
||||||
|
"HomeKit Bridge %s will reset accessory with linked entity_id %s",
|
||||||
|
self._name,
|
||||||
|
entity_id,
|
||||||
|
)
|
||||||
|
|
||||||
acc = self.remove_bridge_accessory(aid)
|
acc = self.remove_bridge_accessory(aid)
|
||||||
removed.append(acc)
|
removed.append(acc)
|
||||||
|
|
||||||
|
if not removed:
|
||||||
|
# No matched accessories, probably on another bridge
|
||||||
|
return
|
||||||
|
|
||||||
self.driver.config_changed()
|
self.driver.config_changed()
|
||||||
|
|
||||||
for acc in removed:
|
for acc in removed:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user