From d9b326dd48189f67f6d6e72c092b2ea65b249afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 2 Jul 2022 21:44:20 +0200 Subject: [PATCH] Remove duplicated QNAP QSW format_mac call in config_flow (#74333) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qnap_qsw: config_flow: remove duplicated format_mac Signed-off-by: Álvaro Fernández Rojas --- homeassistant/components/qnap_qsw/config_flow.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/qnap_qsw/config_flow.py b/homeassistant/components/qnap_qsw/config_flow.py index bb42c9ea294..794e8c67baa 100644 --- a/homeassistant/components/qnap_qsw/config_flow.py +++ b/homeassistant/components/qnap_qsw/config_flow.py @@ -78,7 +78,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): _LOGGER.debug("DHCP discovery detected QSW: %s", self._discovered_mac) - mac = format_mac(self._discovered_mac) options = ConnectionOptions(self._discovered_url, "", "") qsw = QnapQswApi(aiohttp_client.async_get_clientsession(self.hass), options) @@ -87,7 +86,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): except QswError as err: raise AbortFlow("cannot_connect") from err - await self.async_set_unique_id(format_mac(mac)) + await self.async_set_unique_id(format_mac(self._discovered_mac)) self._abort_if_unique_id_configured() return await self.async_step_discovered_connection()