Use references in config flow of devolo_home_control (#40949)

This commit is contained in:
Guido Schmitz 2020-10-03 21:33:33 +02:00 committed by GitHub
parent 78dfaa72a2
commit daf3a29ae5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View file

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

View file

@ -2,21 +2,21 @@
"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"
}
}
}
}
}

View file

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