Add unique id check in wiffi config flow (#60388)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>pull/62999/head
parent
98135d8158
commit
85f2e259da
|
@ -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
|
||||
|
|
|
@ -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."
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in New Issue