Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR adds missing response type codes to the Plugwise USB library. New enum members are introduced to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #422 +/- ##
==========================================
+ Coverage 82.06% 82.08% +0.01%
==========================================
Files 36 36
Lines 8181 8189 +8
==========================================
+ Hits 6714 6722 +8
Misses 1467 1467 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plugwise_usb/messages/responses.py`:
- Around line 83-91: NodeAckResponseType introduced DEFAULT_ACK and DEFAULT_FAIL
but consumers still treat non-SCAN_CONFIG_* values as unexpected; update the
code that interprets ack results (e.g., the handler in
plugwise_usb/nodes/scan.py that checks NodeAckResponseType around the scan
config ack logic) to treat DEFAULT_ACK as equivalent to SCAN_CONFIG_ACCEPTED and
DEFAULT_FAIL as equivalent to SCAN_CONFIG_FAILED (or otherwise branch validly
for DEFAULT_*), and audit other uses of NodeAckResponseType to ensure
DEFAULT_ACK/DEFAULT_FAIL are handled consistently instead of being treated as
failures/unexpected.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c1d0f893-767b-4cea-b225-678684f065d9
📒 Files selected for processing (2)
CHANGELOG.mdplugwise_usb/messages/responses.py
| DEFAULT_ACK= b"00A0" | ||
| DEFAULT_FAIL = b"00A1" | ||
| SCAN_CONFIG_ACCEPTED = b"00BE" # HN_ACKSETSCANPARAMS_ACK | ||
| SCAN_CONFIG_FAILED = b"00BF" # HN_ACKSETSCANPARAMS_NACK | ||
| SCAN_LIGHT_CALIBRATION_ACCEPTED = b"00BD" | ||
| SENSE_INTERVAL_ACCEPTED = b"00B3" | ||
| SENSE_INTERVAL_FAILED = b"00B4" | ||
| SENSE_BOUNDARIES_ACCEPTED = b"00B5" | ||
| SENSE_BOUNDARIES_FAILED = b"00B6" | ||
| SENSE_INTERVAL_ACCEPTED = b"00B3" # HN_ACKSETSENSEINTERVAL_ACK | ||
| SENSE_INTERVAL_FAILED = b"00B4" # HN_ACKSETSENSEINTERVAL_NACK | ||
| SENSE_BOUNDARIES_ACCEPTED = b"00B5" # HN_ACKSETSENSEBOUNDARIES_ACK | ||
| SENSE_BOUNDARIES_FAILED = b"00B6" # HN_ACKSETSENSEBOUNDARIES_NACK |
There was a problem hiding this comment.
Update the NodeAckResponseType consumers with these new default codes.
DEFAULT_ACK / DEFAULT_FAIL only fix enum parsing here. At minimum, plugwise_usb/nodes/scan.py Lines 452-465 still treats any NodeAckResponseType outside SCAN_CONFIG_* as unexpected and returns False, so a successful DEFAULT_ACK would still be surfaced as a failed scan configuration.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugwise_usb/messages/responses.py` around lines 83 - 91, NodeAckResponseType
introduced DEFAULT_ACK and DEFAULT_FAIL but consumers still treat
non-SCAN_CONFIG_* values as unexpected; update the code that interprets ack
results (e.g., the handler in plugwise_usb/nodes/scan.py that checks
NodeAckResponseType around the scan config ack logic) to treat DEFAULT_ACK as
equivalent to SCAN_CONFIG_ACCEPTED and DEFAULT_FAIL as equivalent to
SCAN_CONFIG_FAILED (or otherwise branch validly for DEFAULT_*), and audit other
uses of NodeAckResponseType to ensure DEFAULT_ACK/DEFAULT_FAIL are handled
consistently instead of being treated as failures/unexpected.
|



Summary by CodeRabbit