From 9ead2c7148532d8349da003862dffeb6331758f2 Mon Sep 17 00:00:00 2001 From: Steffen Zimmermann Date: Sat, 1 Jan 2022 20:36:45 +0100 Subject: [PATCH] Improve wiffi config flow handling (#63167) Don't use `async_set_unique_id` and `_abort_if_unique_id_configured` because TCP port number is not a unique id. Use `_async_abort_entries_match` instead. --- homeassistant/components/wiffi/config_flow.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/wiffi/config_flow.py b/homeassistant/components/wiffi/config_flow.py index 79f26d82585..5087915181e 100644 --- a/homeassistant/components/wiffi/config_flow.py +++ b/homeassistant/components/wiffi/config_flow.py @@ -38,8 +38,7 @@ class WiffiFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): return self._async_show_form() # received input from form or configuration.yaml - await self.async_set_unique_id(user_input[CONF_PORT]) - self._abort_if_unique_id_configured() + self._async_abort_entries_match(user_input) try: # try to start server to check whether port is in use