Upgrade pushbullet.py to 0.7.1

This commit is contained in:
Paulus Schoutsen 2015-01-11 08:09:25 -08:00
parent c2b8f8d34e
commit 035e3e686e
3 changed files with 13 additions and 7 deletions

View File

@ -50,7 +50,7 @@ def setup(hass, config):
notify_service = notify_implementation.get_service(hass, config) notify_service = notify_implementation.get_service(hass, config)
if notify_service is None: if notify_service is None:
_LOGGER.error("Failed to initialize notificatino service %s", _LOGGER.error("Failed to initialize notification service %s",
platform) platform)
return False return False

View File

@ -22,17 +22,23 @@ def get_service(hass, config):
try: try:
# pylint: disable=unused-variable # pylint: disable=unused-variable
from pushbullet import PushBullet # noqa from pushbullet import PushBullet, InvalidKeyError # noqa
except ImportError: except ImportError:
_LOGGER.exception( _LOGGER.exception(
"Unable to import pushbullet. " "Unable to import pushbullet. "
"Did you maybe not install the 'pushbullet' package?") "Did you maybe not install the 'pushbullet.py' package?")
return None return None
try:
return PushBulletNotificationService(config[DOMAIN][CONF_API_KEY]) 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 # pylint: disable=too-few-public-methods
class PushBulletNotificationService(BaseNotificationService): class PushBulletNotificationService(BaseNotificationService):

View File

@ -21,8 +21,8 @@ pyuserinput>=0.1.9
# switch.tellstick, tellstick_sensor # switch.tellstick, tellstick_sensor
tellcore-py>=1.0.4 tellcore-py>=1.0.4
# namp_tracker plugin # device_tracker.nmap
python-libnmap python-libnmap
# pushbullet # notify.pushbullet
pushbullet.py>=0.5.0 pushbullet.py>=0.7.1