mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
Add unique id check in wiffi config flow (#60388)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
98135d8158
commit
85f2e259da
@ -38,6 +38,8 @@ class WiffiFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
return self._async_show_form()
|
return self._async_show_form()
|
||||||
|
|
||||||
# received input from form or configuration.yaml
|
# 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:
|
||||||
# try to start server to check whether port is in use
|
# try to start server to check whether port is in use
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
},
|
},
|
||||||
"abort": {
|
"abort": {
|
||||||
"addr_in_use": "Server port already in use.",
|
"addr_in_use": "Server port already in use.",
|
||||||
|
"already_configured": "Server port is already configured.",
|
||||||
"start_server_failed": "Start server failed."
|
"start_server_failed": "Start server failed."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"abort": {
|
"abort": {
|
||||||
"addr_in_use": "Server port already in use.",
|
"addr_in_use": "Server port already in use.",
|
||||||
|
"already_configured": "Server port is already configured.",
|
||||||
"start_server_failed": "Start server failed."
|
"start_server_failed": "Start server failed."
|
||||||
},
|
},
|
||||||
"step": {
|
"step": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user