From 7d81ef9e8f112de3fc76934ec0dc885aacde07a7 Mon Sep 17 00:00:00 2001 From: "David F. Mulcahey" Date: Thu, 10 Oct 2024 15:35:40 -0400 Subject: [PATCH] Add logging to LocalDataCluster (#3408) --- zhaquirks/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zhaquirks/__init__.py b/zhaquirks/__init__.py index fd419f7893..ba14b0fd14 100644 --- a/zhaquirks/__init__.py +++ b/zhaquirks/__init__.py @@ -66,18 +66,23 @@ class LocalDataCluster(CustomCluster): async def bind(self): """Prevent bind.""" + self.debug("binding LocalDataCluster") return (foundation.Status.SUCCESS,) async def unbind(self): """Prevent unbind.""" + self.debug("unbinding LocalDataCluster") return (foundation.Status.SUCCESS,) async def _configure_reporting(self, *args, **kwargs): # pylint: disable=W0221 """Prevent remote configure reporting.""" + self.debug("configuring reporting for LocalDataCluster") return (foundation.ConfigureReportingResponse.deserialize(b"\x00")[0],) async def read_attributes_raw(self, attributes, manufacturer=None): """Prevent remote reads.""" + msg = "reading attributes for LocalDataCluster" + self.debug(f"{msg}: attributes={attributes} manufacturer={manufacturer}") records = [ foundation.ReadAttributeRecord( attr, foundation.Status.UNSUPPORTED_ATTRIBUTE, foundation.TypeValue() @@ -95,6 +100,8 @@ async def read_attributes_raw(self, attributes, manufacturer=None): async def write_attributes(self, attributes, manufacturer=None): """Prevent remote writes.""" + msg = "writing attributes for LocalDataCluster" + self.debug(f"{msg}: attributes={attributes} manufacturer={manufacturer}") for attrid, value in attributes.items(): if isinstance(attrid, str): attrid = self.attributes_by_name[attrid].id