Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging to LocalDataCluster #3408

Merged
merged 5 commits into from
Oct 10, 2024
Merged
Changes from 1 commit
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
14 changes: 5 additions & 9 deletions zhaquirks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,22 @@

async def bind(self):
"""Prevent bind."""
self.debug(f"binding LocalDataCluster with cluster_id: {self.cluster_id}")
self.debug("binding LocalDataCluster")
return (foundation.Status.SUCCESS,)

async def unbind(self):
"""Prevent unbind."""
self.debug(f"unbinding LocalDataCluster with cluster_id: {self.cluster_id}")
self.debug("unbinding LocalDataCluster")

Check warning on line 74 in zhaquirks/__init__.py

View check run for this annotation

Codecov / codecov/patch

zhaquirks/__init__.py#L74

Added line #L74 was not covered by tests
return (foundation.Status.SUCCESS,)

async def _configure_reporting(self, *args, **kwargs): # pylint: disable=W0221
"""Prevent remote configure reporting."""
self.debug(
f"configuring reporting for LocalDataCluster with cluster_id: {self.cluster_id}",
*args,
**kwargs,
)
self.debug("configuring reporting for LocalDataCluster", *args, **kwargs)

Check warning on line 79 in zhaquirks/__init__.py

View check run for this annotation

Codecov / codecov/patch

zhaquirks/__init__.py#L79

Added line #L79 was not covered by tests
TheJulianJES marked this conversation as resolved.
Show resolved Hide resolved
return (foundation.ConfigureReportingResponse.deserialize(b"\x00")[0],)

async def read_attributes_raw(self, attributes, manufacturer=None):
"""Prevent remote reads."""
msg = f"reading attributes for LocalDataCluster with cluster_id: {self.cluster_id}"
msg = "reading attributes for LocalDataCluster"
self.debug(f"{msg} attributes: {attributes} manufacturer: {manufacturer}")
records = [
foundation.ReadAttributeRecord(
Expand All @@ -104,7 +100,7 @@

async def write_attributes(self, attributes, manufacturer=None):
"""Prevent remote writes."""
msg = f"writing attributes for LocalDataCluster with cluster_id: {self.cluster_id}"
msg = "writing attributes for LocalDataCluster"
self.debug(f"{msg} attributes: {attributes} manufacturer: {manufacturer}")
for attrid, value in attributes.items():
if isinstance(attrid, str):
Expand Down
Loading