Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions homeassistant/components/asuswrt/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ async def async_step_user(
) -> FlowResult:
"""Handle a flow initiated by the user."""

# if exist one entry without unique ID, we abort config flow
# if there's one entry without unique ID, we abort config flow
for unique_id in self._async_current_ids():
if unique_id is None:
return self.async_abort(reason="not_unique_id_exist")
return self.async_abort(reason="no_unique_id")

if user_input is None:
return self._show_setup_form(user_input)
Expand Down Expand Up @@ -188,7 +188,7 @@ async def async_step_user(
return self.async_abort(reason="invalid_unique_id")
else:
_LOGGER.warning(
"This device do not provide a valid Unique ID."
"This device does not provide a valid Unique ID."
" Configuration of multiple instance will not be possible"
)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/asuswrt/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"abort": {
"invalid_unique_id": "Impossible to determine a valid unique id for the device",
"not_unique_id_exist": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible"
"no_unique_id": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible"
}
},
"options": {
Expand Down
5 changes: 2 additions & 3 deletions homeassistant/components/asuswrt/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"config": {
"abort": {
"invalid_unique_id": "Impossible to determine a valid unique id for the device",
"not_unique_id_exist": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible",
"single_instance_allowed": "Already configured. Only a single configuration possible."
"no_unique_id": "A device without a valid unique id is already configured. Configuration of multiple instance is not possible"
},
"error": {
"cannot_connect": "Failed to connect",
Expand Down Expand Up @@ -44,4 +43,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion tests/components/asuswrt/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async def test_abort_if_not_unique_id_setup(hass):
data=CONFIG_DATA,
)
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
assert result["reason"] == "not_unique_id_exist"
assert result["reason"] == "no_unique_id"


@pytest.mark.usefixtures("connect")
Expand Down