From c5ce6efa45b7e6527bb2d7cd8f4198fc21878637 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 3 Aug 2026 18:10:58 +0200 Subject: [PATCH] Migrate home_connect dhcp flow to call async_get_devices (#177972) --- homeassistant/components/home_connect/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/home_connect/config_flow.py b/homeassistant/components/home_connect/config_flow.py index dc8025c51369..897416b156b6 100644 --- a/homeassistant/components/home_connect/config_flow.py +++ b/homeassistant/components/home_connect/config_flow.py @@ -68,14 +68,14 @@ class OAuth2FlowHandler( ) -> ConfigFlowResult: """Handle a DHCP discovery.""" device_registry = dr.async_get(self.hass) - if device_entry := device_registry.async_get_device( + for device in device_registry.async_get_devices( identifiers={ (DOMAIN, discovery_info.hostname), (DOMAIN, discovery_info.hostname.split("-")[-1]), } ): device_registry.async_update_device( - device_entry.id, + device.id, new_connections={ (dr.CONNECTION_NETWORK_MAC, discovery_info.macaddress) },