diff --git a/homeassistant/components/wiffi/config_flow.py b/homeassistant/components/wiffi/config_flow.py index f9456f25df2..79f26d82585 100644 --- a/homeassistant/components/wiffi/config_flow.py +++ b/homeassistant/components/wiffi/config_flow.py @@ -38,6 +38,8 @@ 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() try: # try to start server to check whether port is in use diff --git a/homeassistant/components/wiffi/strings.json b/homeassistant/components/wiffi/strings.json index d4dc66972c7..ebc5dd67a20 100644 --- a/homeassistant/components/wiffi/strings.json +++ b/homeassistant/components/wiffi/strings.json @@ -10,6 +10,7 @@ }, "abort": { "addr_in_use": "Server port already in use.", + "already_configured": "Server port is already configured.", "start_server_failed": "Start server failed." } }, diff --git a/homeassistant/components/wiffi/translations/en.json b/homeassistant/components/wiffi/translations/en.json index 046f37de2c7..6732e5102da 100644 --- a/homeassistant/components/wiffi/translations/en.json +++ b/homeassistant/components/wiffi/translations/en.json @@ -2,6 +2,7 @@ "config": { "abort": { "addr_in_use": "Server port already in use.", + "already_configured": "Server port is already configured.", "start_server_failed": "Start server failed." }, "step": {