mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Use reference strings in rainmachine (#41216)
This commit is contained in:
parent
f50976a0b3
commit
b7ff0a5a49
@ -69,7 +69,7 @@ class RainMachineFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
ssl=user_input.get(CONF_SSL, True),
|
||||
)
|
||||
except RainMachineError:
|
||||
return await self._show_form({CONF_PASSWORD: "invalid_credentials"})
|
||||
return await self._show_form({CONF_PASSWORD: "invalid_auth"})
|
||||
|
||||
# Unfortunately, RainMachine doesn't provide a way to refresh the
|
||||
# access token without using the IP address and password, so we have to
|
||||
|
@ -11,11 +11,11 @@
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"identifier_exists": "Account already registered",
|
||||
"invalid_credentials": "Invalid credentials"
|
||||
"identifier_exists": "[%key:common::config_flow::abort::already_configured_account%]",
|
||||
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]"
|
||||
},
|
||||
"abort": {
|
||||
"already_configured": "This RainMachine controller is already configured."
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ async def test_invalid_password(hass):
|
||||
side_effect=RainMachineError,
|
||||
):
|
||||
result = await flow.async_step_user(user_input=conf)
|
||||
assert result["errors"] == {CONF_PASSWORD: "invalid_credentials"}
|
||||
assert result["errors"] == {CONF_PASSWORD: "invalid_auth"}
|
||||
|
||||
|
||||
async def test_show_form(hass):
|
||||
|
Loading…
x
Reference in New Issue
Block a user