Check netgear device_tracker link_rate to ensure device is connected (#30581)

* check link_rate to ensure device is connected

* black
This commit is contained in:
Daniel Lashua 2020-01-09 13:45:42 -06:00 committed by Martin Hjelmare
parent 208a123c47
commit 669844e4dd

View File

@ -110,7 +110,10 @@ class NetgearDeviceScanner(DeviceScanner):
or dev.name in self.excluded_devices
)
)
if tracked:
# when link_rate is None this means the router still knows about
# the device, but it is not in range.
if tracked and dev.link_rate is not None:
devices.append(dev.mac)
if (
self.tracked_accesspoints