From e95c0ef3a8bc437fc9fe7c42f325c3801368c91b Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Sat, 18 Oct 2025 19:54:27 +0200 Subject: [PATCH] Move translatable URL out of strings.json for compit (#154771) --- homeassistant/components/compit/config_flow.py | 5 ++++- homeassistant/components/compit/strings.json | 2 +- tests/components/compit/test_config_flow.py | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/compit/config_flow.py b/homeassistant/components/compit/config_flow.py index 3f41aec8f13..fc2cac432b1 100644 --- a/homeassistant/components/compit/config_flow.py +++ b/homeassistant/components/compit/config_flow.py @@ -78,7 +78,10 @@ class CompitConfigFlow(ConfigFlow, domain=DOMAIN): ) 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={"compit_url": "https://inext.compit.pl/"}, ) async def async_step_reauth(self, data: Mapping[str, Any]) -> ConfigFlowResult: diff --git a/homeassistant/components/compit/strings.json b/homeassistant/components/compit/strings.json index c043fe525f2..3daefd25f66 100644 --- a/homeassistant/components/compit/strings.json +++ b/homeassistant/components/compit/strings.json @@ -2,7 +2,7 @@ "config": { "step": { "user": { - "description": "Please enter your https://inext.compit.pl/ credentials.", + "description": "Please enter your {compit_url} credentials.", "title": "Connect to Compit iNext", "data": { "email": "[%key:common::config_flow::data::email%]", diff --git a/tests/components/compit/test_config_flow.py b/tests/components/compit/test_config_flow.py index 2305187e000..58f364c62bc 100644 --- a/tests/components/compit/test_config_flow.py +++ b/tests/components/compit/test_config_flow.py @@ -27,6 +27,9 @@ async def test_async_step_user_success( ) assert result["type"] is FlowResultType.FORM assert result["step_id"] == config_entries.SOURCE_USER + assert result["description_placeholders"] == { + "compit_url": "https://inext.compit.pl/" + } result = await hass.config_entries.flow.async_configure( result["flow_id"], CONFIG_INPUT