Restore Optional Target Config Attribute (notify.pushover) (#3769)

* Restore Optional Target Config Attribute

* Fix Tabs

* Change indents to spaces

* Make a target fix

* Change to simpler not syntax
This commit is contained in:
Keith Lamprecht 2016-10-12 00:59:34 -04:00 committed by Paulus Schoutsen
parent 40094cecae
commit d83de36c32

View File

@ -63,6 +63,9 @@ class PushoverNotificationService(BaseNotificationService):
targets = kwargs.get(ATTR_TARGET) targets = kwargs.get(ATTR_TARGET)
if not isinstance(targets, list):
targets = [targets]
for target in targets: for target in targets:
if target is not None: if target is not None:
data['device'] = target data['device'] = target