hass-core/homeassistant/components/telegram_bot/broadcast.py
Fabian Affolter 127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00

20 lines
584 B
Python

"""Support for Telegram bot to send messages only."""
import logging
from homeassistant.components.telegram_bot import (
initialize_bot,
PLATFORM_SCHEMA as TELEGRAM_PLATFORM_SCHEMA)
_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