Move imports in cisco_webex_teams component (#27878)

This commit is contained in:
bouni 2019-10-19 00:23:17 +02:00 committed by cgtobi
parent d7a8a635ba
commit 7ed5616faa

View File

@ -2,11 +2,12 @@
import logging
import voluptuous as vol
from webexteamssdk import ApiError, WebexTeamsAPI, exceptions
from homeassistant.components.notify import (
ATTR_TITLE,
PLATFORM_SCHEMA,
BaseNotificationService,
ATTR_TITLE,
)
from homeassistant.const import CONF_TOKEN
import homeassistant.helpers.config_validation as cv
@ -22,7 +23,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def get_service(hass, config, discovery_info=None):
"""Get the CiscoWebexTeams notification service."""
from webexteamssdk import WebexTeamsAPI, exceptions
client = WebexTeamsAPI(access_token=config[CONF_TOKEN])
try:
@ -45,7 +45,6 @@ class CiscoWebexTeamsNotificationService(BaseNotificationService):
def send_message(self, message="", **kwargs):
"""Send a message to a user."""
from webexteamssdk import ApiError
title = ""
if kwargs.get(ATTR_TITLE) is not None: