Reset zeroconf log level (#36002)

This commit is contained in:
Erik Montnemery 2020-05-23 18:29:13 +02:00 committed by GitHub
parent 2c7eee6722
commit b136390647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ from zeroconf import (
ServiceInfo,
ServiceStateChange,
Zeroconf,
log as zeroconf_log,
)
from homeassistant import util
@ -114,6 +115,8 @@ class HaZeroconf(Zeroconf):
def setup(hass, config):
"""Set up Zeroconf and make Home Assistant discoverable."""
# Zeroconf sets its log level to WARNING, reset it to allow filtering by the logger component.
zeroconf_log.setLevel(logging.NOTSET)
zeroconf = hass.data[DOMAIN] = _get_instance(
hass, config.get(DOMAIN, {}).get(CONF_DEFAULT_INTERFACE)
)