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 authored and Martin Hjelmare committed 2020-01-09 20:45:42 +01:00
1 parent 208a123c47
commit 669844e4dd
1 file changed
+4 -1
@@ -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