Merge pull request #625 from balloob/enhancement_pushbullet

Enhancement: targeted notifications in pushbullet
This commit is contained in:
Paulus Schoutsen committed 2015-11-15 16:41:18 -08:00
commit b4e2f4f0be
4 files changed
+91 -12

No files matched your search

+5 -1
View File
@@ -23,6 +23,9 @@ DEPENDENCIES = []
ATTR_TITLE = "title"
ATTR_TITLE_DEFAULT = "Home Assistant"
# Target of the notification (user, device, etc)
ATTR_TARGET = 'target'
# Text to notify user of
ATTR_MESSAGE = "message"
@@ -69,8 +72,9 @@ def setup(hass, config):
return
title = call.data.get(ATTR_TITLE, ATTR_TITLE_DEFAULT)
target = call.data.get(ATTR_TARGET)
notify_service.send_message(message, title=title)
notify_service.send_message(message, title=title, target=target)
# register service
service_call_handler = partial(notify_message, notify_service)