Check netgear device_tracker link_rate to ensure device is connected ()

* check link_rate to ensure device is connected

* black
pull/30630/head
Daniel Lashua 2020-01-09 13:45:42 -06:00 committed by Martin Hjelmare
parent 208a123c47
commit 669844e4dd
1 changed files with 4 additions and 1 deletions
homeassistant/components/netgear

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