mirror of
https://github.com/Electric-Special/ha-core.git
synced 2026-03-21 09:03:13 +01:00
MCP remove translatable URL (#154995)
This commit is contained in:
@@ -47,6 +47,8 @@ MCP_DISCOVERY_HEADERS = {
|
||||
"MCP-Protocol-Version": "2025-03-26",
|
||||
}
|
||||
|
||||
EXAMPLE_URL = "http://example/sse"
|
||||
|
||||
|
||||
@dataclass
|
||||
class OAuthConfig:
|
||||
@@ -182,7 +184,10 @@ class ModelContextProtocolConfigFlow(AbstractOAuth2FlowHandler, domain=DOMAIN):
|
||||
return self.async_create_entry(title=info["title"], data=user_input)
|
||||
|
||||
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={"example_url": EXAMPLE_URL},
|
||||
)
|
||||
|
||||
async def async_step_auth_discovery(
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"url": "[%key:common::config_flow::data::url%]"
|
||||
},
|
||||
"data_description": {
|
||||
"url": "The remote MCP server URL for the SSE endpoint, for example http://example/sse"
|
||||
"url": "The remote MCP server URL for the SSE endpoint, for example {example_url}"
|
||||
}
|
||||
},
|
||||
"credentials_choice": {
|
||||
@@ -35,7 +35,7 @@
|
||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
||||
"unknown": "[%key:common::config_flow::error::unknown%]",
|
||||
"timeout_connect": "[%key:common::config_flow::error::timeout_connect%]",
|
||||
"invalid_url": "Must be a valid MCP server URL e.g. https://example.com/sse"
|
||||
"invalid_url": "Must be a valid MCP server URL"
|
||||
},
|
||||
"abort": {
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
|
||||
|
||||
Reference in New Issue
Block a user