Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions homeassistant/components/zha/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,16 @@ async def _attempt_single_cluster_device(self, endpoint, cluster,
"""Try to set up an entity from a "bare" cluster."""
if cluster.cluster_id in profile_clusters:
return
# pylint: disable=unidiomatic-typecheck
if type(cluster) not in device_classes:

component = None
for cluster_type, candidate_component in device_classes.items():
if isinstance(cluster, cluster_type):
component = candidate_component
break

if component is None:
return

component = device_classes[type(cluster)]
cluster_key = "{}-{}".format(device_key, cluster.cluster_id)
discovery_info = {
'application_listener': self,
Expand Down