Pushbullet; styling, requirements, example

pull/625/head
Tom Duijf 2015-11-15 19:14:10 +00:00
parent 3a85bebbf6
commit 0b0fd2490d
3 changed files with 9 additions and 4 deletions
homeassistant/components/notify

View File

@ -8,12 +8,13 @@ https://home-assistant.io/components/notify.pushbullet/
"""
import logging
from homeassistant.components.notify import ATTR_TITLE, BaseNotificationService
from homeassistant.components.notify import (
ATTR_TITLE, ATTR_TARGET, BaseNotificationService)
from homeassistant.const import CONF_API_KEY
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['pushbullet.py==0.9.0']
ATTR_TARGET = 'target'
# pylint: disable=unused-argument
def get_service(hass, config):
@ -61,8 +62,8 @@ class PushBulletNotificationService(BaseNotificationService):
def send_message(self, message=None, **kwargs):
""" Send a message to a user. """
targets = kwargs.get(ATTR_TARGET)
title = kwargs.get(ATTR_TITLE)
# Disabeling title
title = kwargs.get(ATTR_TITLE)
title = None
if targets:

View File

@ -9,3 +9,7 @@ notify:
title:
description: Optional title for your notification.
example: 'Your Garage Door Friend'
target:
description: Target of the notification. Optional depending on the platform
example: platform specific

View File

@ -29,7 +29,7 @@ tellcore-py==1.1.2
python-nmap==0.4.3
# PushBullet (notify.pushbullet)
pushbullet.py==0.8.1
pushbullet.py==0.9.0
# Nest Thermostat (thermostat.nest)
python-nest==2.6.0