mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 15:45:08 +02:00
In some circumstances device.last_seen can be None (#25690)
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user