Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions homeassistant/components/airly/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -85,6 +89,7 @@ async def async_step_user(
}
),
errors=errors,
description_placeholders=DESCRIPTION_PLACEHOLDERS,
)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/airly/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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%]",
Expand Down
6 changes: 5 additions & 1 deletion homeassistant/components/mastodon/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
)
2 changes: 1 addition & 1 deletion homeassistant/components/mastodon/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 0 additions & 2 deletions homeassistant/components/mqtt/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
16 changes: 14 additions & 2 deletions homeassistant/components/nibe_heatpump/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down Expand Up @@ -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 = {}
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/nibe_heatpump/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
},
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/uptime_kuma/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/uptime_kuma/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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**"
}
Expand Down
Loading