Migrate mitsubishi_comfort dhcp flow to call async_get_devices (#177974)

This commit is contained in:
Erik Montnemery
2026-08-02 07:19:53 +02:00
committed by GitHub
parent c43f0f88cb
commit 825d697d8d
@@ -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,
)