From cf1a27bd7c9fd9323fb825b7d7d5cf7297614f37 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 3 Jun 2017 22:33:12 +0200 Subject: [PATCH] Use constants (#7888) --- homeassistant/components/notify/xmpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/notify/xmpp.py b/homeassistant/components/notify/xmpp.py index 8faafbeab58..eedd82f2400 100644 --- a/homeassistant/components/notify/xmpp.py +++ b/homeassistant/components/notify/xmpp.py @@ -33,8 +33,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def get_service(hass, config, discovery_info=None): """Get the Jabber (XMPP) notification service.""" return XmppNotificationService( - config.get('sender'), config.get('password'), config.get('recipient'), - config.get('tls')) + config.get(CONF_SENDER), config.get(CONF_PASSWORD), + config.get(CONF_RECIPIENT), config.get(CONF_TLS)) class XmppNotificationService(BaseNotificationService): @@ -52,7 +52,7 @@ class XmppNotificationService(BaseNotificationService): title = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT) data = '{}: {}'.format(title, message) if title else message - send_message(self._sender + '/home-assistant', self._password, + send_message('{}/home-assistant'.format(self._sender), self._password, self._recipient, self._tls, data)