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/quality_scale.yaml b/homeassistant/components/co2signal/quality_scale.yaml index d2ddb091e5ef..3d518092633d 100644 --- a/homeassistant/components/co2signal/quality_scale.yaml +++ b/homeassistant/components/co2signal/quality_scale.yaml @@ -18,7 +18,6 @@ rules: status: todo comment: | The config flow misses data descriptions. - Remove URLs from data descriptions, they should be replaced with placeholders. Make use of Electricity Maps zone keys in country code as dropdown. Make use of location selector for coordinates. dependency-transparency: done 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": {