From 825d697d8dfd047fa618b78335bf0cd8f5f510d3 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Sun, 2 Aug 2026 07:19:53 +0200 Subject: [PATCH] Migrate mitsubishi_comfort dhcp flow to call async_get_devices (#177974) --- homeassistant/components/mitsubishi_comfort/config_flow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/mitsubishi_comfort/config_flow.py b/homeassistant/components/mitsubishi_comfort/config_flow.py index 7edae20eab09..84581f611b5f 100644 --- a/homeassistant/components/mitsubishi_comfort/config_flow.py +++ b/homeassistant/components/mitsubishi_comfort/config_flow.py @@ -88,14 +88,15 @@ class MitsubishiComfortConfigFlow(ConfigFlow, domain=DOMAIN): changed IP. """ mac = dr.format_mac(discovery_info.macaddress) - device = dr.async_get(self.hass).async_get_device( + devices = dr.async_get(self.hass).async_get_devices( connections={(dr.CONNECTION_NETWORK_MAC, mac)} ) + device_entry_ids = {device.config_entry_id for device in devices} entry = next( ( entry for entry in self._async_current_entries(include_ignore=False) - if device is not None and entry.entry_id in device.config_entries + if entry.entry_id in device_entry_ids ), None, )