Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@puddly
Copy link
Collaborator

@puddly puddly commented Aug 18, 2025

Fixes #1655.

For devices that send unknown ZCL commands, zigpy currently passes through the raw bytes instead of parsing the command into a structure. This is behavior that will be removed at some point.

Copilot AI review requested due to automatic review settings August 18, 2025 18:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reduces the log level for a specific warning message in the zigpy listeners module from warning to debug level. The change addresses issue #1655 where warning messages were being logged when devices send unknown ZCL commands that zigpy passes through as raw bytes.

  • Changes log level from warning to debug for matcher/command incompatibility messages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Contributor

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good with the tests fixed

diff --git a/tests/test_listeners.py b/tests/test_listeners.py
index d7d728bc..3a73bdf8 100644
--- a/tests/test_listeners.py
+++ b/tests/test_listeners.py
@@ -157,7 +157,7 @@ async def test_listener_callback_invalid_matcher(caplog):
         callback=mock.Mock(),
     )
 
-    with caplog.at_level(logging.WARNING):
+    with caplog.at_level(logging.DEBUG):
         assert not listener.resolve(make_hdr(off()), off())
 
     assert listener.callback.mock_calls == []
@@ -170,7 +170,7 @@ async def test_listener_callback_invalid_call(caplog):
         callback=mock.Mock(),
     )
 
-    with caplog.at_level(logging.WARNING):
+    with caplog.at_level(logging.DEBUG):
         assert not listener.resolve(make_hdr(on()), b"data")
 
     assert listener.callback.mock_calls == []

@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 99.29%. Comparing base (88c3ba6) to head (3fdd649).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1656   +/-   ##
=======================================
  Coverage   99.29%   99.29%           
=======================================
  Files          57       57           
  Lines       11638    11638           
=======================================
  Hits        11556    11556           
  Misses         82       82           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@puddly puddly merged commit feef7fa into zigpy:dev Aug 19, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Matcher checkin() and command ... are incompatible

2 participants