In some circumstances device.last_seen can be None (#25690)
parent
f8753a0c92
commit
2925f9e57a
|
@ -296,7 +296,9 @@ class UniFiDeviceTracker(ScannerEntity):
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
dt_util.utcnow() - dt_util.utc_from_timestamp(float(self.device.last_seen))
|
self.device.last_seen
|
||||||
|
and dt_util.utcnow()
|
||||||
|
- dt_util.utc_from_timestamp(float(self.device.last_seen))
|
||||||
) < detection_time:
|
) < detection_time:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue