mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use reference strings in Withings (#41345)
This commit is contained in:
parent
21655e93bf
commit
04b04027c3
@ -70,7 +70,7 @@ class WithingsFlowHandler(
|
||||
self._current_data = {}
|
||||
return await self.async_step_finish(new_data)
|
||||
|
||||
errors["base"] = "profile_exists"
|
||||
errors["base"] = "already_configured_account"
|
||||
|
||||
return self.async_show_form(
|
||||
step_id="profile",
|
||||
|
@ -14,14 +14,16 @@
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"profile_exists": "User profile is already configured. Please provide a unique profile name."
|
||||
"already_configured_account": "[%key:common::config_flow::abort::already_configured_account%]"
|
||||
},
|
||||
"abort": {
|
||||
"authorize_url_timeout": "Timeout generating authorize url.",
|
||||
"missing_configuration": "The Withings integration is not configured. Please follow the documentation.",
|
||||
"authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]",
|
||||
"missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]",
|
||||
"already_configured": "Configuration updated for profile.",
|
||||
"no_url_available": "[%key:common::config_flow::abort::oauth2_no_url_available%]"
|
||||
},
|
||||
"create_entry": { "default": "Successfully authenticated with Withings." }
|
||||
"create_entry": {
|
||||
"default": "Successfully authenticated with Withings."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ async def test_config_non_unique_profile(hass: HomeAssistant) -> None:
|
||||
)
|
||||
|
||||
assert result
|
||||
assert result["errors"]["base"] == "profile_exists"
|
||||
assert result["errors"]["base"] == "already_configured_account"
|
||||
|
||||
|
||||
async def test_config_reauth_profile(
|
||||
|
Loading…
x
Reference in New Issue
Block a user