From 7ed5616faac0004008548a9977a9bb25a1bb7222 Mon Sep 17 00:00:00 2001 From: bouni Date: Sat, 19 Oct 2019 00:23:17 +0200 Subject: [PATCH] Move imports in cisco_webex_teams component (#27878) --- homeassistant/components/cisco_webex_teams/notify.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/cisco_webex_teams/notify.py b/homeassistant/components/cisco_webex_teams/notify.py index a77f5673df7..6f80fa138d4 100644 --- a/homeassistant/components/cisco_webex_teams/notify.py +++ b/homeassistant/components/cisco_webex_teams/notify.py @@ -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: