Improve type hints in keenetic_ndms2 (#77649)

This commit is contained in:
epenet 2022-09-19 12:35:59 +02:00 committed by GitHub
parent 747e538172
commit f30a94daa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,10 +97,10 @@ class KeeneticTracker(ScannerEntity):
) )
@property @property
def is_connected(self): def is_connected(self) -> bool:
"""Return true if the device is connected to the network.""" """Return true if the device is connected to the network."""
return ( return (
self._last_seen self._last_seen is not None
and (dt_util.utcnow() - self._last_seen) and (dt_util.utcnow() - self._last_seen)
< self._router.consider_home_interval < self._router.consider_home_interval
) )