diff --git a/homeassistant/components/notify/__init__.py b/homeassistant/components/notify/__init__.py index d0c73045f63..0728a979588 100644 --- a/homeassistant/components/notify/__init__.py +++ b/homeassistant/components/notify/__init__.py @@ -50,7 +50,7 @@ def setup(hass, config): notify_service = notify_implementation.get_service(hass, config) if notify_service is None: - _LOGGER.error("Failed to initialize notificatino service %s", + _LOGGER.error("Failed to initialize notification service %s", platform) return False diff --git a/homeassistant/components/notify/pushbullet.py b/homeassistant/components/notify/pushbullet.py index 0f22d7d2970..953fa874458 100644 --- a/homeassistant/components/notify/pushbullet.py +++ b/homeassistant/components/notify/pushbullet.py @@ -22,16 +22,22 @@ def get_service(hass, config): try: # pylint: disable=unused-variable - from pushbullet import PushBullet # noqa + from pushbullet import PushBullet, InvalidKeyError # noqa except ImportError: _LOGGER.exception( "Unable to import pushbullet. " - "Did you maybe not install the 'pushbullet' package?") + "Did you maybe not install the 'pushbullet.py' package?") return None - return PushBulletNotificationService(config[DOMAIN][CONF_API_KEY]) + try: + return PushBulletNotificationService(config[DOMAIN][CONF_API_KEY]) + + except InvalidKeyError: + _LOGGER.error( + "Wrong API key supplied. " + "Get it at https://www.pushbullet.com/account") # pylint: disable=too-few-public-methods diff --git a/requirements.txt b/requirements.txt index 0f90b83ec0b..e0e003dd5eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,8 +21,8 @@ pyuserinput>=0.1.9 # switch.tellstick, tellstick_sensor tellcore-py>=1.0.4 -# namp_tracker plugin +# device_tracker.nmap python-libnmap -# pushbullet -pushbullet.py>=0.5.0 +# notify.pushbullet +pushbullet.py>=0.7.1