From 85af452c6e84ac0aecf070303e24e1f062218071 Mon Sep 17 00:00:00 2001 From: rappenze Date: Thu, 12 Oct 2023 19:51:43 +0200 Subject: [PATCH] Remove unnecessary dict lookup in fibaro integration (#101885) --- homeassistant/components/fibaro/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/fibaro/__init__.py b/homeassistant/components/fibaro/__init__.py index 29fc2c5b774..90b1f0a5425 100644 --- a/homeassistant/components/fibaro/__init__.py +++ b/homeassistant/components/fibaro/__init__.py @@ -227,11 +227,8 @@ class FibaroController: def get_siblings(self, device: DeviceModel) -> list[DeviceModel]: """Get the siblings of a device.""" if device.has_endpoint_id: - return self.get_children2( - self._device_map[device.fibaro_id].parent_fibaro_id, - self._device_map[device.fibaro_id].endpoint_id, - ) - return self.get_children(self._device_map[device.fibaro_id].parent_fibaro_id) + return self.get_children2(device.parent_fibaro_id, device.endpoint_id) + return self.get_children(device.parent_fibaro_id) @staticmethod def _map_device_to_platform(device: DeviceModel) -> Platform | None: