Get the device_id after initializing/creating the device

This commit is contained in:
Fabio Manganiello 2019-03-07 20:11:32 +01:00
parent 9324ad3f9b
commit 38ebe87220
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,6 @@ class PushbulletBackend(Backend):
self.proxy_host = proxy_host
self.proxy_port = proxy_port
self.pb = Pushbullet(token)
self.pb_device_id = self.get_device_id()
self.listener = None
try:
@ -61,6 +60,7 @@ class PushbulletBackend(Backend):
except:
self.device = self.pb.new_device(self.device_name)
self.pb_device_id = self.get_device_id()
def _get_latest_push(self):
t = int(time.time()) - 5