Fixed Pushbullet backend

This commit is contained in:
Fabio Manganiello 2019-06-08 22:37:19 +02:00
parent 6019ba9db6
commit 33d55dcd93

View file

@ -1,12 +1,9 @@
import json import json
import requests
import time import time
from pushbullet import Pushbullet, Listener from pushbullet import Pushbullet, Listener
from platypush.backend import Backend from platypush.backend import Backend
from platypush.config import Config
from platypush.message import Message
from platypush.message.event.pushbullet import PushbulletEvent from platypush.message.event.pushbullet import PushbulletEvent
@ -115,9 +112,8 @@ class PushbulletBackend(Backend):
try: try:
return self.pb.get_device(self.device_name).device_iden return self.pb.get_device(self.device_name).device_iden
except Exception as e: except Exception as e:
device = self.pb.new_device(name, model='Platypush virtual device', device = self.pb.new_device(self.device_name, model='Platypush virtual device',
manufactorer='platypush', manufacturer='platypush', icon='system')
app_version=8623, icon='system')
self.logger.info('Created Pushbullet device {}'.format( self.logger.info('Created Pushbullet device {}'.format(
self.device_name)) self.device_name))