Use common strings in tellduslive config flow (#41408)

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
scheric 2020-10-08 18:14:21 +02:00 committed by GitHub
parent 5345e9fb5c
commit c2d0c90cd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -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):

View File

@ -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": {

View File

@ -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):