Hi,
I mostly use iOS notifications nowadays, but still had Telegram configured as a fallback, so I might not be up to speed with the latest changes.
I’ve seen that there were some additions to the telegram platform in the most recent releases, but I didn’t think they’d concern me.
My “legacy” config for telegram notifications looks like:
notify:
- platform: telegram
name: telegram
api_key: '...'
chat_id: ...
I just updated to 0.45 and the HA web interface notified me that there’s something wrong with my telegram config (which I didn’t touch for weeks).
Is this still supposed to work? I didn’t read anything about the notify Telegram component being deprecated.
Anyway, I disabled the notify component and set up the telegram_bot
platform:
telegram_bot:
platform: webhooks
api_key: '...'
allowed_chat_ids:
- ...
This results in an error message at HA startup:
ERROR (MainThread) [homeassistant.components.telegram_bot] Error setting up platform webhooks
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/telegram_bot/__init__.py", line 194, in async_setup_platform
platform.async_setup_platform(hass, p_config, discovery_info)
File "/usr/src/app/homeassistant/components/telegram_bot/webhooks.py", line 46, in async_setup_platform
result = yield from hass.async_add_job(bot.setWebhook, handler_url)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/telegram/bot.py", line 125, in decorator
result = func(self, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/telegram/bot.py", line 1280, in setWebhook
result = self._request.post(url, data, timeout=timeout)
File "/usr/local/lib/python3.6/site-packages/telegram/utils/request.py", line 207, in post
**urlopen_kwargs)
File "/usr/local/lib/python3.6/site-packages/telegram/utils/request.py", line 152, in _request_wrapper
raise BadRequest(repr(message))
telegram.error.BadRequest: 'Bad Request: bad webhook: HTTPS url must be provided for webhook'
So, how is this supposed to work now?
Sebastian