From 553fcb515606a40cb42a7ef10aed7d431a43bb7e Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Sat, 18 Oct 2025 19:46:58 +0100 Subject: [PATCH] Move url out of FreedomPro strings.json (#154786) --- homeassistant/components/freedompro/config_flow.py | 14 ++++++++++++-- homeassistant/components/freedompro/strings.json | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/freedompro/config_flow.py b/homeassistant/components/freedompro/config_flow.py index 48d075f8a87..17234213fc5 100644 --- a/homeassistant/components/freedompro/config_flow.py +++ b/homeassistant/components/freedompro/config_flow.py @@ -14,6 +14,7 @@ from homeassistant.helpers import aiohttp_client from .const import DOMAIN STEP_USER_DATA_SCHEMA = vol.Schema({vol.Required(CONF_API_KEY): str}) +API_KEY_URL = "https://freedompro.eu/" class Hub: @@ -53,7 +54,11 @@ class FreedomProConfigFlow(ConfigFlow, domain=DOMAIN): """Show the setup form to the user.""" if user_input is None: return self.async_show_form( - step_id="user", data_schema=STEP_USER_DATA_SCHEMA + step_id="user", + data_schema=STEP_USER_DATA_SCHEMA, + description_placeholders={ + "api_key_url": API_KEY_URL, + }, ) errors = {} @@ -68,7 +73,12 @@ class FreedomProConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_create_entry(title="Freedompro", data=user_input) return self.async_show_form( - step_id="user", data_schema=STEP_USER_DATA_SCHEMA, errors=errors + step_id="user", + data_schema=STEP_USER_DATA_SCHEMA, + errors=errors, + description_placeholders={ + "api_key_url": API_KEY_URL, + }, ) diff --git a/homeassistant/components/freedompro/strings.json b/homeassistant/components/freedompro/strings.json index 947a9bd2e33..01316aadc34 100644 --- a/homeassistant/components/freedompro/strings.json +++ b/homeassistant/components/freedompro/strings.json @@ -5,7 +5,7 @@ "data": { "api_key": "[%key:common::config_flow::data::api_key%]" }, - "description": "Please enter the API key obtained from https://home.freedompro.eu", + "description": "Please enter the API key obtained from {api_key_url}", "title": "Freedompro API key" } },