mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Use common strings in tellduslive config flow (#41408)
Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
parent
5345e9fb5c
commit
c2d0c90cd4
@ -91,7 +91,7 @@ class FlowHandler(config_entries.ConfigFlow):
|
||||
KEY_SESSION: session,
|
||||
},
|
||||
)
|
||||
errors["base"] = "auth_error"
|
||||
errors["base"] = "invalid_auth"
|
||||
|
||||
try:
|
||||
with async_timeout.timeout(10):
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"config": {
|
||||
"abort": {
|
||||
"already_configured": "TelldusLive is already configured",
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]",
|
||||
"authorize_url_fail": "Unknown error generating an authorize url.",
|
||||
"authorize_url_timeout": "Timeout generating authorize url.",
|
||||
"unknown": "Unknown error occurred"
|
||||
"authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]",
|
||||
"unknown": "[%key:common::config_flow::error::unknown%]"
|
||||
},
|
||||
"error": {
|
||||
"auth_error": "Authentication error, please try again"
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]"
|
||||
},
|
||||
"step": {
|
||||
"auth": {
|
||||
|
@ -201,7 +201,7 @@ async def test_wrong_auth_flow_implementation(hass, mock_tellduslive):
|
||||
result = await flow.async_step_auth("")
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["step_id"] == "auth"
|
||||
assert result["errors"]["base"] == "auth_error"
|
||||
assert result["errors"]["base"] == "invalid_auth"
|
||||
|
||||
|
||||
async def test_not_pick_host_if_only_one(hass, mock_tellduslive):
|
||||
|
Loading…
x
Reference in New Issue
Block a user