Skip interfaces without mac in enigma2 device_info (#124249)

pull/124254/head
Sid 2024-08-19 22:05:43 +02:00 committed by GitHub
parent 407e4f6ca2
commit 566c00ef12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -72,11 +72,14 @@ class Enigma2UpdateCoordinator(DataUpdateCoordinator[OpenWebIfStatus]):
self.device_info["model"] = about["info"]["model"]
self.device_info["manufacturer"] = about["info"]["brand"]
self.device_info[ATTR_IDENTIFIERS] = {
(DOMAIN, format_mac(iface["mac"])) for iface in about["info"]["ifaces"]
(DOMAIN, format_mac(iface["mac"]))
for iface in about["info"]["ifaces"]
if "mac" in iface and iface["mac"] is not None
}
self.device_info[ATTR_CONNECTIONS] = {
(CONNECTION_NETWORK_MAC, format_mac(iface["mac"]))
for iface in about["info"]["ifaces"]
if "mac" in iface and iface["mac"] is not None
}
async def _async_update_data(self) -> OpenWebIfStatus: