Use reference strings in Totalconnect (#41047)
* Update strings.json * Update config_flow.py * Update test_config_flow.py
This commit is contained in:
parent
4ab479d48d
commit
f654834d34
3 changed files with 5 additions and 5 deletions
|
@ -38,7 +38,7 @@ class TotalConnectConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
data={CONF_USERNAME: username, CONF_PASSWORD: password},
|
||||
)
|
||||
# authentication failed / invalid
|
||||
errors["base"] = "login"
|
||||
errors["base"] = "invalid_auth"
|
||||
|
||||
data_schema = vol.Schema(
|
||||
{vol.Required(CONF_USERNAME): str, vol.Required(CONF_PASSWORD): str}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
}
|
||||
},
|
||||
"error": {
|
||||
"login": "Login error: please check your username & password"
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]"
|
||||
},
|
||||
"abort": {
|
||||
"already_configured": "Account already configured"
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,4 +100,4 @@ async def test_login_failed(hass):
|
|||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["errors"] == {"base": "login"}
|
||||
assert result["errors"] == {"base": "invalid_auth"}
|
||||
|
|
Loading…
Add table
Reference in a new issue