From ca86755409a26c32dd5eb7ad513d6e6fb99fbc4e Mon Sep 17 00:00:00 2001 From: Adam Belebczuk Date: Sun, 11 Nov 2018 17:16:23 -0500 Subject: [PATCH] Discord - Minor bugfixes (#18385) Suppress PyNaCl warnings of Discord notify --- homeassistant/components/notify/discord.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/notify/discord.py b/homeassistant/components/notify/discord.py index 8bd4e27155d9..e9f0d5cec28d 100644 --- a/homeassistant/components/notify/discord.py +++ b/homeassistant/components/notify/discord.py @@ -41,6 +41,8 @@ class DiscordNotificationService(BaseNotificationService): async def async_send_message(self, message, **kwargs): """Login to Discord, send message to channel(s) and log out.""" import discord + + discord.VoiceClient.warn_nacl = False discord_bot = discord.Client(loop=self.hass.loop) if ATTR_TARGET not in kwargs: @@ -53,6 +55,7 @@ class DiscordNotificationService(BaseNotificationService): """Send the messages when the bot is ready.""" try: data = kwargs.get(ATTR_DATA) + images = None if data: images = data.get(ATTR_IMAGES) for channelid in kwargs[ATTR_TARGET]: