From 22eed5419efb979ee378a9dd64de29b025985ccf Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Tue, 23 Jan 2024 21:04:59 -0500 Subject: [PATCH] Reduce log level of ZHA endpoint handler init (#108749) * Reduce the log level of endpoint handler init failure to debug * Reduce log level in unit test --- homeassistant/components/zha/core/endpoint.py | 6 +++--- tests/components/zha/test_cluster_handlers.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/zha/core/endpoint.py b/homeassistant/components/zha/core/endpoint.py index 4dbfccf6f251..eb91ec96c594 100644 --- a/homeassistant/components/zha/core/endpoint.py +++ b/homeassistant/components/zha/core/endpoint.py @@ -199,11 +199,11 @@ class Endpoint: results = await gather(*tasks, return_exceptions=True) for cluster_handler, outcome in zip(cluster_handlers, results): if isinstance(outcome, Exception): - cluster_handler.warning( + cluster_handler.debug( "'%s' stage failed: %s", func_name, str(outcome), exc_info=outcome ) - continue - cluster_handler.debug("'%s' stage succeeded", func_name) + else: + cluster_handler.debug("'%s' stage succeeded", func_name) def async_new_entity( self, diff --git a/tests/components/zha/test_cluster_handlers.py b/tests/components/zha/test_cluster_handlers.py index 39f201e668e7..46efe306b91b 100644 --- a/tests/components/zha/test_cluster_handlers.py +++ b/tests/components/zha/test_cluster_handlers.py @@ -591,8 +591,8 @@ async def test_ep_cluster_handlers_configure(cluster_handler) -> None: assert ch.async_configure.call_count == 1 assert ch.async_configure.await_count == 1 - assert ch_3.warning.call_count == 2 - assert ch_5.warning.call_count == 2 + assert ch_3.debug.call_count == 2 + assert ch_5.debug.call_count == 2 async def test_poll_control_configure(poll_control_ch) -> None: