From 67cbbc3522ca7bda6391fc90761a7b8d087f7dcc Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Tue, 14 Oct 2025 14:50:28 +0200 Subject: [PATCH] Move Electricity Maps url out of strings.json (#154284) --- homeassistant/components/co2signal/config_flow.py | 6 ++++++ homeassistant/components/co2signal/strings.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/co2signal/config_flow.py b/homeassistant/components/co2signal/config_flow.py index 00acd2829a66..2401121b76e0 100644 --- a/homeassistant/components/co2signal/config_flow.py +++ b/homeassistant/components/co2signal/config_flow.py @@ -38,6 +38,10 @@ TYPE_SPECIFY_COUNTRY = "specify_country_code" _LOGGER = logging.getLogger(__name__) +DESCRIPTION_PLACEHOLDER = { + "register_link": "https://electricitymaps.com/free-tier", +} + class ElectricityMapsConfigFlow(ConfigFlow, domain=DOMAIN): """Handle a config flow for Co2signal.""" @@ -70,6 +74,7 @@ class ElectricityMapsConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_show_form( step_id="user", data_schema=data_schema, + description_placeholders=DESCRIPTION_PLACEHOLDER, ) data = {CONF_API_KEY: user_input[CONF_API_KEY]} @@ -179,4 +184,5 @@ class ElectricityMapsConfigFlow(ConfigFlow, domain=DOMAIN): step_id=step_id, data_schema=data_schema, errors=errors, + description_placeholders=DESCRIPTION_PLACEHOLDER, ) diff --git a/homeassistant/components/co2signal/strings.json b/homeassistant/components/co2signal/strings.json index a4ec916bd428..69925f589938 100644 --- a/homeassistant/components/co2signal/strings.json +++ b/homeassistant/components/co2signal/strings.json @@ -6,7 +6,7 @@ "location": "[%key:common::config_flow::data::location%]", "api_key": "[%key:common::config_flow::data::access_token%]" }, - "description": "Visit https://electricitymaps.com/free-tier to request a token." + "description": "Visit the [Electricity Maps page]({register_link}) to request a token." }, "coordinates": { "data": {