mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Move imports in xmpp component (#27390)
This commit is contained in:
parent
84d1c0ca31
commit
a5ee138d56
@ -7,6 +7,14 @@ import random
|
|||||||
import string
|
import string
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
import slixmpp
|
||||||
|
from slixmpp.exceptions import IqError, IqTimeout, XMPPError
|
||||||
|
from slixmpp.xmlstream.xmlstream import NotConnectedError
|
||||||
|
from slixmpp.plugins.xep_0363.http_upload import (
|
||||||
|
FileTooBig,
|
||||||
|
FileUploadError,
|
||||||
|
UploadServiceNotFound,
|
||||||
|
)
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -118,14 +126,6 @@ async def async_send_message(
|
|||||||
data=None,
|
data=None,
|
||||||
):
|
):
|
||||||
"""Send a message over XMPP."""
|
"""Send a message over XMPP."""
|
||||||
import slixmpp
|
|
||||||
from slixmpp.exceptions import IqError, IqTimeout, XMPPError
|
|
||||||
from slixmpp.xmlstream.xmlstream import NotConnectedError
|
|
||||||
from slixmpp.plugins.xep_0363.http_upload import (
|
|
||||||
FileTooBig,
|
|
||||||
FileUploadError,
|
|
||||||
UploadServiceNotFound,
|
|
||||||
)
|
|
||||||
|
|
||||||
class SendNotificationBot(slixmpp.ClientXMPP):
|
class SendNotificationBot(slixmpp.ClientXMPP):
|
||||||
"""Service for sending Jabber (XMPP) messages."""
|
"""Service for sending Jabber (XMPP) messages."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user