Fix Netgear handeling of missing MAC in device registry (#144722)

This commit is contained in:
starkillerOG
2025-05-15 10:56:54 +02:00
committed by GitHub
parent ea046f32be
commit fa3edb5c01

View File

@@ -150,7 +150,11 @@ class NetgearRouter:
if device_entry.via_device_id is None:
continue # do not add the router itself
device_mac = dict(device_entry.connections)[dr.CONNECTION_NETWORK_MAC]
device_mac = dict(device_entry.connections).get(
dr.CONNECTION_NETWORK_MAC
)
if device_mac is None:
continue
self.devices[device_mac] = {
"mac": device_mac,
"name": device_entry.name,