From 8a9a6b505b2154f0f977d3f92b3db8681480d618 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 16 Jun 2022 22:14:04 +0200 Subject: [PATCH] Use Field attribute of the Cluster's descriptor property --- custom_components/matter_experimental/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/matter_experimental/sensor.py b/custom_components/matter_experimental/sensor.py index f159bf70..b84b2c63 100644 --- a/custom_components/matter_experimental/sensor.py +++ b/custom_components/matter_experimental/sensor.py @@ -83,7 +83,7 @@ def _get_attribute_value( # Find the attribute descriptor so we know the instance variable to fetch attribute_descriptor: clusters.ClusterObjectFieldDescriptor = next( descriptor - for descriptor in cluster_cls.descriptor() + for descriptor in cluster_cls.descriptor.Fields if descriptor.Tag == attribute.attribute_id )