mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Use references in config flow of devolo_home_control (#40949)
This commit is contained in:
parent
78dfaa72a2
commit
daf3a29ae5
@ -61,7 +61,7 @@ class DevoloHomeControlFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
mydevolo.credentials_valid
|
||||
)
|
||||
if not credentials_valid:
|
||||
return self._show_form({"base": "invalid_credentials"})
|
||||
return self._show_form({"base": "invalid_auth"})
|
||||
_LOGGER.debug("Credentials valid")
|
||||
gateway_ids = await self.hass.async_add_executor_job(mydevolo.get_gateway_ids)
|
||||
await self.async_set_unique_id(gateway_ids[0])
|
||||
|
@ -2,18 +2,18 @@
|
||||
"title": "devolo Home Control",
|
||||
"config": {
|
||||
"abort": {
|
||||
"already_configured": "This Home Control Central Unit is already in use."
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
|
||||
},
|
||||
"error": {
|
||||
"invalid_credentials": "Incorrect user name and/or password."
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]"
|
||||
},
|
||||
"step": {
|
||||
"user": {
|
||||
"data": {
|
||||
"username": "E-Mail-Address / devolo ID",
|
||||
"username": "[%key:common::config_flow::data::email%] / devolo ID",
|
||||
"password": "[%key:common::config_flow::data::password%]",
|
||||
"mydevolo_url": "mydevolo URL",
|
||||
"home_control_url": "Home Control URL"
|
||||
"mydevolo_url": "mydevolo [%key:common::config_flow::data::url%]",
|
||||
"home_control_url": "Home Control [%key:common::config_flow::data::url%]"
|
||||
},
|
||||
"title": "devolo Home Control"
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ async def test_form_invalid_credentials(hass):
|
||||
{"username": "test-username", "password": "test-password"},
|
||||
)
|
||||
|
||||
assert result["errors"] == {"base": "invalid_credentials"}
|
||||
assert result["errors"] == {"base": "invalid_auth"}
|
||||
|
||||
|
||||
async def test_form_already_configured(hass):
|
||||
|
Loading…
x
Reference in New Issue
Block a user