diff --git a/homeassistant/components/notify/pushover.py b/homeassistant/components/notify/pushover.py index 3ec0b27e7c4e09..aa8338879e47e9 100644 --- a/homeassistant/components/notify/pushover.py +++ b/homeassistant/components/notify/pushover.py @@ -14,7 +14,8 @@ from homeassistant.const import CONF_API_KEY import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['python-pushover==0.3'] +REQUIREMENTS = ['https://github.com/amelchio/python-pushover/archive/' + 'local-token.zip#python-pushover==0.5'] _LOGGER = logging.getLogger(__name__) @@ -28,14 +29,8 @@ def get_service(hass, config, discovery_info=None): """Get the Pushover notification service.""" - from pushover import InitError - - try: - return PushoverNotificationService( - config[CONF_USER_KEY], config[CONF_API_KEY]) - except InitError: - _LOGGER.error("Wrong API key supplied") - return None + return PushoverNotificationService( + config[CONF_USER_KEY], config[CONF_API_KEY]) class PushoverNotificationService(BaseNotificationService): @@ -44,10 +39,7 @@ class PushoverNotificationService(BaseNotificationService): def __init__(self, user_key, api_token): """Initialize the service.""" from pushover import Client - self._user_key = user_key - self._api_token = api_token - self.pushover = Client( - self._user_key, api_token=self._api_token) + self.pushover = Client(user_key, api_token=api_token) def send_message(self, message='', **kwargs): """Send a message to a user.""" diff --git a/requirements_all.txt b/requirements_all.txt index 0bb763a3faed94..c7372ce131e7d2 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1069,7 +1069,7 @@ python-nest==4.0.3 python-nmap==0.6.1 # homeassistant.components.notify.pushover -python-pushover==0.3 +python-pushover==0.5 # homeassistant.components.sensor.ripple python-ripple-api==0.0.3