Revert "Update application_credentials example with redirect_url (#2547)" (#2556)

This reverts commit 36e526f6ac3bf008b76e47c6b1d5944fcd8f7ab2.
This commit is contained in:
tronikos 2025-02-08 00:39:54 -08:00 committed by GitHub
parent 6a03edc66f
commit 31b636e88f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -132,7 +132,7 @@ Translations for Application Credentials are defined under the `application_cred
```json ```json
{ {
"application_credentials": { "application_credentials": {
"description": "Navigate to the [developer console]({console_url}) to create credentials. Add `{redirect_url}` under *Authorized redirect URI*. Then enter the credentials below.", "description": "Navigate to the [developer console]({console_url}) to create credentials then enter them below.",
} }
} }
``` ```
@ -141,14 +141,12 @@ You may optionally add description placeholder keys that are added to the messag
```python ```python
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import config_entry_oauth2_flow
async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]: async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]:
"""Return description placeholders for the credentials dialog.""" """Return description placeholders for the credentials dialog."""
return { return {
"console_url": "https://example.com/developer/console", "console_url": "https://example.com/developer/console",
"redirect_url": config_entry_oauth2_flow.async_get_redirect_uri(hass),
} }
``` ```
While developing locally, you will need to run `python3 -m script.translations develop` to see changes made to `strings.json` [More info on translating Home Assistant.](translations.md) While developing locally, you will need to run `python3 -m script.translations develop` to see changes made to `strings.json` [More info on translating Home Assistant.](translations.md)