mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Fix Telegram bot proxy URL not initialized when creating a new bot (#147707)
This commit is contained in:
parent
ae48e3716e
commit
6dc464ad73
@ -328,6 +328,9 @@ class TelgramBotConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
|
||||
# validate connection to Telegram API
|
||||
errors: dict[str, str] = {}
|
||||
user_input[CONF_PROXY_URL] = user_input[SECTION_ADVANCED_SETTINGS].get(
|
||||
CONF_PROXY_URL
|
||||
)
|
||||
bot_name = await self._validate_bot(
|
||||
user_input, errors, description_placeholders
|
||||
)
|
||||
@ -350,7 +353,9 @@ class TelgramBotConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
data={
|
||||
CONF_PLATFORM: user_input[CONF_PLATFORM],
|
||||
CONF_API_KEY: user_input[CONF_API_KEY],
|
||||
CONF_PROXY_URL: user_input["advanced_settings"].get(CONF_PROXY_URL),
|
||||
CONF_PROXY_URL: user_input[SECTION_ADVANCED_SETTINGS].get(
|
||||
CONF_PROXY_URL
|
||||
),
|
||||
},
|
||||
options={
|
||||
# this value may come from yaml import
|
||||
|
@ -117,6 +117,7 @@ async def test_reconfigure_flow_broadcast(
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "reconfigure_successful"
|
||||
assert mock_webhooks_config_entry.data[CONF_PLATFORM] == PLATFORM_BROADCAST
|
||||
assert mock_webhooks_config_entry.data[CONF_PROXY_URL] == "https://test"
|
||||
|
||||
|
||||
async def test_reconfigure_flow_webhooks(
|
||||
|
Loading…
x
Reference in New Issue
Block a user