Pushbullet, fix multiple messages sent when url param is set (#9006)

This commit is contained in:
karlkar 2017-08-16 09:29:42 +02:00 committed by Daniel Høyer Iversen
parent e7ce110dc6
commit f114263845

View File

@ -91,7 +91,7 @@ class PushBulletNotificationService(BaseNotificationService):
# Backward compatibility, notify all devices in own account
if url:
self.pushbullet.push_link(title, url, body=message)
if filepath and self.hass.config.is_allowed_path(filepath):
elif filepath and self.hass.config.is_allowed_path(filepath):
with open(filepath, "rb") as fileh:
filedata = self.pushbullet.upload_file(fileh, filepath)
self.pushbullet.push_file(title=title, body=message,