diff --git a/homeassistant/components/airly/config_flow.py b/homeassistant/components/airly/config_flow.py index 19ebb096a31c41..d3f2240a37c7d3 100644 --- a/homeassistant/components/airly/config_flow.py +++ b/homeassistant/components/airly/config_flow.py @@ -18,6 +18,10 @@ from .const import CONF_USE_NEAREST, DOMAIN, NO_AIRLY_SENSORS +DESCRIPTION_PLACEHOLDERS = { + "developer_registration_url": "https://developer.airly.eu/register", +} + class AirlyFlowHandler(ConfigFlow, domain=DOMAIN): """Config flow for Airly.""" @@ -85,6 +89,7 @@ async def async_step_user( } ), errors=errors, + description_placeholders=DESCRIPTION_PLACEHOLDERS, ) diff --git a/homeassistant/components/airly/strings.json b/homeassistant/components/airly/strings.json index fe4ccbb4745e8b..056858caab80bf 100644 --- a/homeassistant/components/airly/strings.json +++ b/homeassistant/components/airly/strings.json @@ -2,7 +2,7 @@ "config": { "step": { "user": { - "description": "To generate API key go to https://developer.airly.eu/register", + "description": "To generate API key go to {developer_registration_url}", "data": { "name": "[%key:common::config_flow::data::name%]", "api_key": "[%key:common::config_flow::data::api_key%]", diff --git a/homeassistant/components/mastodon/config_flow.py b/homeassistant/components/mastodon/config_flow.py index dbd617eca5f236..6cc82fd50f1595 100644 --- a/homeassistant/components/mastodon/config_flow.py +++ b/homeassistant/components/mastodon/config_flow.py @@ -134,4 +134,8 @@ async def async_step_user( data=user_input, ) - return self.show_user_form(user_input, errors) + return self.show_user_form( + user_input, + errors, + description_placeholders={"example_url": "https://mastodon.social"}, + ) diff --git a/homeassistant/components/mastodon/strings.json b/homeassistant/components/mastodon/strings.json index 5b8ce59fbd7137..f6950cda668959 100644 --- a/homeassistant/components/mastodon/strings.json +++ b/homeassistant/components/mastodon/strings.json @@ -9,7 +9,7 @@ "access_token": "[%key:common::config_flow::data::access_token%]" }, "data_description": { - "base_url": "The URL of your Mastodon instance e.g. https://mastodon.social.", + "base_url": "The URL of your Mastodon instance e.g. {example_url}.", "client_id": "The client key for the application created within your Mastodon account.", "client_secret": "The client secret for the application created within your Mastodon account.", "access_token": "The access token for the application created within your Mastodon account." diff --git a/homeassistant/components/mqtt/const.py b/homeassistant/components/mqtt/const.py index f5d370828adde9..c77264b91d6241 100644 --- a/homeassistant/components/mqtt/const.py +++ b/homeassistant/components/mqtt/const.py @@ -302,7 +302,6 @@ DEFAULT_PAYLOAD_STOP = "STOP" DEFAULT_PAYLOAD_TRIGGER = "TRIGGER" DEFAULT_PAYLOAD_UNLOCK = "UNLOCK" -DEFAULT_PORT = 1883 DEFAULT_RETAIN = False DEFAULT_TILT_CLOSED_POSITION = 0 DEFAULT_TILT_MAX = 100 @@ -313,7 +312,6 @@ DEFAULT_WS_PATH = "/" DEFAULT_POSITION_CLOSED = 0 DEFAULT_POSITION_OPEN = 100 -DEFAULT_RETAIN = False DEFAULT_SPEED_RANGE_MAX = 100 DEFAULT_SPEED_RANGE_MIN = 1 DEFAULT_STATE_LOCKED = "LOCKED" diff --git a/homeassistant/components/nibe_heatpump/config_flow.py b/homeassistant/components/nibe_heatpump/config_flow.py index 2d47d570f213ac..4206c6edf7382d 100644 --- a/homeassistant/components/nibe_heatpump/config_flow.py +++ b/homeassistant/components/nibe_heatpump/config_flow.py @@ -73,6 +73,13 @@ ) +STEP_MODBUS_PLACEHOLDERS = { + "tcp": "tcp://[HOST]:[PORT]", + "serial": "serial://[LOCAL DEVICE]", + "rfc2217": "rfc2217://[HOST]:[PORT]", +} + + class FieldError(Exception): """Field with invalid data.""" @@ -183,7 +190,9 @@ async def async_step_modbus( """Handle the modbus step.""" if user_input is None: return self.async_show_form( - step_id="modbus", data_schema=STEP_MODBUS_DATA_SCHEMA + step_id="modbus", + data_schema=STEP_MODBUS_DATA_SCHEMA, + description_placeholders=STEP_MODBUS_PLACEHOLDERS, ) errors = {} @@ -200,7 +209,10 @@ async def async_step_modbus( return self.async_create_entry(title=title, data=data) return self.async_show_form( - step_id="modbus", data_schema=STEP_MODBUS_DATA_SCHEMA, errors=errors + step_id="modbus", + data_schema=STEP_MODBUS_DATA_SCHEMA, + errors=errors, + description_placeholders=STEP_MODBUS_PLACEHOLDERS, ) async def async_step_nibegw( diff --git a/homeassistant/components/nibe_heatpump/strings.json b/homeassistant/components/nibe_heatpump/strings.json index 1b33952658664a..c07edbbf70d0f1 100644 --- a/homeassistant/components/nibe_heatpump/strings.json +++ b/homeassistant/components/nibe_heatpump/strings.json @@ -15,7 +15,7 @@ "modbus_unit": "Modbus unit identifier" }, "data_description": { - "modbus_url": "Modbus URL that describes the connection to your heat pump or MODBUS40 unit. It should be in the form:\n - `tcp://[HOST]:[PORT]` for Modbus TCP connection\n - `serial://[LOCAL DEVICE]` for a local Modbus RTU connection\n - `rfc2217://[HOST]:[PORT]` for a remote Telnet-based Modbus RTU connection.", + "modbus_url": "Modbus URL that describes the connection to your heat pump or MODBUS40 unit. It should be in the form:\n - `{tcp}` for Modbus TCP connection\n - `{serial}` for a local Modbus RTU connection\n - `{rfc2217}` for a remote Telnet-based Modbus RTU connection.", "modbus_unit": "Unit identification for your heat pump. Can usually be left at 0." } }, diff --git a/homeassistant/components/uptime_kuma/config_flow.py b/homeassistant/components/uptime_kuma/config_flow.py index a6429ea7dfec68..0b230fd4ea675b 100644 --- a/homeassistant/components/uptime_kuma/config_flow.py +++ b/homeassistant/components/uptime_kuma/config_flow.py @@ -42,6 +42,7 @@ } ) STEP_REAUTH_DATA_SCHEMA = vol.Schema({vol.Optional(CONF_API_KEY, default=""): str}) +PLACEHOLDER = {"example_url": "https://uptime.example.com:3001"} async def validate_connection( @@ -100,6 +101,7 @@ async def async_step_user( data_schema=STEP_USER_DATA_SCHEMA, suggested_values=user_input ), errors=errors, + description_placeholders=PLACEHOLDER, ) async def async_step_reauth( @@ -170,6 +172,7 @@ async def async_step_reconfigure( suggested_values=user_input or entry.data, ), errors=errors, + description_placeholders=PLACEHOLDER, ) async def async_step_hassio( diff --git a/homeassistant/components/uptime_kuma/strings.json b/homeassistant/components/uptime_kuma/strings.json index e84b68501f33c7..e4a21004cfe5e4 100644 --- a/homeassistant/components/uptime_kuma/strings.json +++ b/homeassistant/components/uptime_kuma/strings.json @@ -9,7 +9,7 @@ "api_key": "[%key:common::config_flow::data::api_key%]" }, "data_description": { - "url": "Enter the full URL of your Uptime Kuma instance. Be sure to include the protocol (`http` or `https`), the hostname or IP address, the port number (if it is a non-default port), and any path prefix if applicable. Example: `https://uptime.example.com`", + "url": "Enter the full URL of your Uptime Kuma instance. Be sure to include the protocol (`http` or `https`), the hostname or IP address, the port number (if it is a non-default port), and any path prefix if applicable. Example: `{example_url}`", "verify_ssl": "Enable SSL certificate verification for secure connections. Disable only if connecting to an Uptime Kuma instance using a self-signed certificate or via IP address", "api_key": "Enter an API key. To create a new API key navigate to **Settings → API Keys** and select **Add API Key**" }