From 5b24b271ccc244373d0e42976a6eb2c941112af8 Mon Sep 17 00:00:00 2001 From: "David F. Mulcahey" Date: Wed, 20 Feb 2019 10:27:03 -0500 Subject: [PATCH] Don't dispatch to components when there are no channels for ZHA sensors (#21223) * don't dispatch when channels don't exist * review comment --- homeassistant/components/zha/core/gateway.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/zha/core/gateway.py b/homeassistant/components/zha/core/gateway.py index 4fbf96a22b6..cd549afc819 100644 --- a/homeassistant/components/zha/core/gateway.py +++ b/homeassistant/components/zha/core/gateway.py @@ -253,6 +253,10 @@ async def _create_cluster_channel(cluster, zha_device, is_new_join, async def _dispatch_discovery_info(hass, is_new_join, discovery_info): """Dispatch or store discovery information.""" + if not discovery_info['channels']: + _LOGGER.warning( + "there are no channels in the discovery info: %s", discovery_info) + return component = discovery_info['component'] if is_new_join: async_dispatcher_send(