hass-core/homeassistant/components/telegram_bot/broadcast.py
Paulus Schoutsen 4b1de61110
Use relative imports inside integrations (#22235)
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00

18 lines
537 B
Python

"""Support for Telegram bot to send messages only."""
import logging
from . import PLATFORM_SCHEMA as TELEGRAM_PLATFORM_SCHEMA, initialize_bot
_LOGGER = logging.getLogger(__name__)
PLATFORM_SCHEMA = TELEGRAM_PLATFORM_SCHEMA
async def async_setup_platform(hass, config):
"""Set up the Telegram broadcast platform."""
bot = initialize_bot(config)
bot_config = await hass.async_add_job(bot.getMe)
_LOGGER.debug("Telegram broadcast platform setup with bot %s",
bot_config['username'])
return True