Skip to content

Commit

Permalink
refactor is_manufacturer_specific_cluster, and fix an issue as it mig…
Browse files Browse the repository at this point in the history
…ht return None
  • Loading branch information
pipiche38 committed Nov 22, 2023
1 parent 96b54ec commit 5e2450a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Modules/readZclClusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,8 @@ def is_cluster_zcl_config_available( self, nwkid, ep, cluster, attribute=None):

def is_manufacturer_specific_cluster( self, cluster):

if cluster not in self.readZclClusters:
return False
if "ManufSpecificCluster" in self.readZclClusters[ cluster ]:
# We have a Manufacturer Specific cluster
return True

return bool(self.readZclClusters.get(cluster, {}).get("ManufSpecificCluster", False))


def is_generic_zcl_cluster( self, cluster, attribute=None):
if cluster not in self.readZclClusters:
Expand Down

0 comments on commit 5e2450a

Please sign in to comment.