diff --git a/homeassistant/components/notify/smtp.py b/homeassistant/components/notify/smtp.py index 65c0d381d80..aa994089213 100644 --- a/homeassistant/components/notify/smtp.py +++ b/homeassistant/components/notify/smtp.py @@ -20,10 +20,10 @@ _LOGGER = logging.getLogger(__name__) def get_service(hass, config): """ Get the mail notification service. """ - if not validate_config( - {DOMAIN: config}, - {DOMAIN: ['server', 'port', 'sender', 'username', 'password', - 'recipient']}, _LOGGER): + if not validate_config({DOMAIN: config}, + {DOMAIN: ['server', 'port', 'sender', 'username', + 'password', 'recipient']}, + _LOGGER): return None smtp_server = config['server'] diff --git a/homeassistant/components/notify/xmpp.py b/homeassistant/components/notify/xmpp.py index c29f14a51ad..6f026e63d5d 100644 --- a/homeassistant/components/notify/xmpp.py +++ b/homeassistant/components/notify/xmpp.py @@ -50,6 +50,7 @@ class XmppNotificationService(BaseNotificationService): def send_message(sender, password, recipient, message): + """ Send a message over XMPP. """ import sleekxmpp class SendNotificationBot(sleekxmpp.ClientXMPP): @@ -78,4 +79,4 @@ def send_message(sender, password, recipient, message): """" Disconnect from the server if credentials are invalid. """ self.disconnect() - SendNotificationBot(sender, password, recipient, message) + SendNotificationBot()