Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions homeassistant/components/notify/pushover.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only depend on dependencies from PyPI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hence the waiting-for-upstream label. But it's been a while, so it's fine with me to close this while waiting for an updated release.

'local-token.zip#python-pushover==0.5']
_LOGGER = logging.getLogger(__name__)


Expand All @@ -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):
Expand All @@ -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."""
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down