mirror of
https://github.com/skalavala/mysmarthome.git
synced 2025-08-19 11:38:22 +00:00
cleaned up, and updated to latest version.
This commit is contained in:
17
custom_components/telegram_bot/broadcast.py
Normal file
17
custom_components/telegram_bot/broadcast.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""Support for Telegram bot to send messages only."""
|
||||
import logging
|
||||
|
||||
from . import initialize_bot
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config):
|
||||
"""Set up the Telegram broadcast platform."""
|
||||
bot = initialize_bot(config)
|
||||
|
||||
bot_config = await hass.async_add_executor_job(bot.getMe)
|
||||
_LOGGER.debug(
|
||||
"Telegram broadcast platform setup with bot %s", bot_config["username"]
|
||||
)
|
||||
return True
|
Reference in New Issue
Block a user