mirror of
https://github.com/home-assistant/core.git
synced 2026-02-15 07:36:16 +00:00
Fix config flow bug for Telegram bot (#162555)
This commit is contained in:
@@ -237,9 +237,9 @@ class TelgramBotConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
# validate connection to Telegram API
|
||||
errors: dict[str, str] = {}
|
||||
user_input[CONF_API_ENDPOINT] = (
|
||||
user_input[SECTION_ADVANCED_SETTINGS][CONF_API_ENDPOINT],
|
||||
)
|
||||
user_input[CONF_API_ENDPOINT] = user_input[SECTION_ADVANCED_SETTINGS][
|
||||
CONF_API_ENDPOINT
|
||||
]
|
||||
user_input[CONF_PROXY_URL] = user_input[SECTION_ADVANCED_SETTINGS].get(
|
||||
CONF_PROXY_URL
|
||||
)
|
||||
|
||||
@@ -574,6 +574,7 @@ async def test_duplicate_entry(hass: HomeAssistant) -> None:
|
||||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
assert result["data"][CONF_PLATFORM] == PLATFORM_BROADCAST
|
||||
assert result["data"][CONF_API_KEY] == "mock api key"
|
||||
assert result["data"][CONF_API_ENDPOINT] == "http://mock_api_endpoint"
|
||||
assert result["options"][ATTR_PARSER] == PARSER_MD
|
||||
|
||||
# test: import 2nd entry failed due to duplicate
|
||||
|
||||
Reference in New Issue
Block a user