Fix url lookup in telegram_bot webhook (#55587)

pull/55601/head
Joakim Sørensen 2021-09-02 19:17:33 +02:00 committed by GitHub
parent cabb9c0ea4
commit 4f33679255
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -33,9 +33,8 @@ async def async_setup_platform(hass, config):
bot = initialize_bot(config) bot = initialize_bot(config)
current_status = await hass.async_add_executor_job(bot.getWebhookInfo) current_status = await hass.async_add_executor_job(bot.getWebhookInfo)
base_url = config.get( if not (base_url := config.get(CONF_URL)):
CONF_URL, get_url(hass, require_ssl=True, allow_internal=False) base_url = get_url(hass, require_ssl=True, allow_internal=False)
)
# Some logging of Bot current status: # Some logging of Bot current status:
last_error_date = getattr(current_status, "last_error_date", None) last_error_date = getattr(current_status, "last_error_date", None)