From bf776d33b2787b421e45514e0134402f0e830e16 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 10 Jun 2025 14:10:35 +0200 Subject: [PATCH] Explain Withings setup (#146216) --- .../components/withings/application_credentials.py | 8 ++++++++ homeassistant/components/withings/strings.json | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/withings/application_credentials.py b/homeassistant/components/withings/application_credentials.py index ce96ed782dd..0939f9c5b82 100644 --- a/homeassistant/components/withings/application_credentials.py +++ b/homeassistant/components/withings/application_credentials.py @@ -75,3 +75,11 @@ class WithingsLocalOAuth2Implementation(AuthImplementation): } ) return {**token, **new_token} + + +async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]: + """Return description placeholders for the credentials dialog.""" + return { + "developer_dashboard_url": "https://developer.withings.com/dashboard/welcome", + "redirect_url": "https://my.home-assistant.io/redirect/oauth", + } diff --git a/homeassistant/components/withings/strings.json b/homeassistant/components/withings/strings.json index 8eb4293c637..14c7bf640e9 100644 --- a/homeassistant/components/withings/strings.json +++ b/homeassistant/components/withings/strings.json @@ -1,4 +1,7 @@ { + "application_credentials": { + "description": "To be able to login to Withings we require a client ID and secret. To acquire them, please follow the following steps.\n\n1. Go to the [Withings Developer Dashboard]({developer_dashboard_url}) and be sure to select the Public Cloud.\n1. Log in with your Withings account.\n1. Select **Create an application**.\n1. Select the checkbox for **Public API integration**.\n1. Select **Development** as target environment.\n1. Fill in an application name and description of your choice.\n1. Fill in `{redirect_url}` for the registered URL. Make sure that you don't press the button to test it.\n1. Fill in the client ID and secret that are now available." + }, "config": { "step": { "pick_implementation": { @@ -9,7 +12,7 @@ "description": "The Withings integration needs to re-authenticate your account" }, "oauth_discovery": { - "description": "Home Assistant has found a Withings device on your network. Press **Submit** to continue setting up Withings." + "description": "Home Assistant has found a Withings device on your network. Be aware that the setup of Withings is more complicated than many other integrations. Press **Submit** to continue setting up Withings." } }, "error": {