Prevent the zeroconf service browser from terminating when a device without any addresses is discovered. (#38094)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-07-22 20:21:57 -10:00
1 parent 5583f43030
commit fdc5208d18
2 files changed
+31

No files matched your search

@@ -210,6 +210,11 @@ def setup(hass, config):
return
info = info_from_service(service_info)
if not info:
# Prevent the browser thread from collapsing
_LOGGER.debug("Failed to get addresses for device %s", name)
return
_LOGGER.debug("Discovered new device %s %s", name, info)
# If we can handle it as a HomeKit discovery, we do that here.
@@ -317,6 +322,9 @@ def info_from_service(service):
except UnicodeDecodeError:
pass
if not service.addresses:
return None
address = service.addresses[0]
info = {