Use common strings in Mill config flow (#41836)
This commit is contained in:
parent
243a4e5df6
commit
db802ff2b4
3 changed files with 3 additions and 3 deletions
|
@ -40,7 +40,7 @@ class MillConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
errors = {}
|
||||
|
||||
if not await mill_data_connection.connect():
|
||||
errors["connection_error"] = "connection_error"
|
||||
errors["cannot_connect"] = "cannot_connect"
|
||||
return self.async_show_form(
|
||||
step_id="user",
|
||||
data_schema=DATA_SCHEMA,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
|
||||
},
|
||||
"error": {
|
||||
"connection_error": "[%key:common::config_flow::error::cannot_connect%]"
|
||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
|
||||
},
|
||||
"step": {
|
||||
"user": {
|
||||
|
|
|
@ -87,4 +87,4 @@ async def test_connection_error(hass):
|
|||
)
|
||||
|
||||
assert result["type"] == "form"
|
||||
assert result["errors"]["connection_error"] == "connection_error"
|
||||
assert result["errors"]["cannot_connect"] == "cannot_connect"
|
||||
|
|
Loading…
Add table
Reference in a new issue