mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Move imports in cisco_webex_teams component (#27878)
This commit is contained in:
parent
d7a8a635ba
commit
7ed5616faa
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user