mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 22:25:13 +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 (
|
||||
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:
|
||||
return True
|
||||
return False
|
||||
|
Reference in New Issue
Block a user