add my_partner for get the partner of one device
This commit is contained in:
parent
67cf797c6c
commit
7bf879bbcf
|
@ -632,6 +632,14 @@ class Device(Thing):
|
|||
return self.binding.device.devicehub_id
|
||||
return self.devicehub_id
|
||||
|
||||
@property
|
||||
def my_partner(self):
|
||||
if self.placeholder and self.placeholder.binding:
|
||||
return self.placeholder.binding
|
||||
if self.binding:
|
||||
return self.binding.device
|
||||
return self
|
||||
|
||||
@property
|
||||
def get_updated(self):
|
||||
if self.placeholder and self.placeholder.binding:
|
||||
|
|
Reference in New Issue