Reconnect client service tried to connect even if device didn't exist (#65082)

This commit is contained in:
Robert Svensson 2022-01-28 17:33:31 +01:00 committed by GitHub
parent f369cef32f
commit da355438aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 22 deletions

View file

@ -57,6 +57,9 @@ async def async_reconnect_client(hass, data) -> None:
device_registry = dr.async_get(hass)
device_entry = device_registry.async_get(data[ATTR_DEVICE_ID])
if device_entry is None:
return
mac = ""
for connection in device_entry.connections:
if connection[0] == CONNECTION_NETWORK_MAC: