-
Notifications
You must be signed in to change notification settings - Fork 4
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
Check before executing unsupported action #456
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces changes to the HomeWizard Energy library, focusing on error handling and method support checks. The modifications primarily affect the base and V1 implementation classes, updating how unsupported methods are handled. The changes replace Changes
Sequence DiagramsequenceDiagram
participant Client
participant HomeWizardEnergyV1
participant Device
Client->>HomeWizardEnergyV1: Call state() or identify()
HomeWizardEnergyV1->>Device: Check device support
alt Device not supported
HomeWizardEnergyV1-->>Client: Raise UnsupportedError
else Device supported
HomeWizardEnergyV1->>Device: Proceed with operation
Device-->>HomeWizardEnergyV1: Return result
HomeWizardEnergyV1-->>Client: Return result
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #456 +/- ##
==========================================
- Coverage 95.49% 95.14% -0.36%
==========================================
Files 9 8 -1
Lines 533 535 +2
Branches 37 39 +2
==========================================
Hits 509 509
Misses 17 17
- Partials 7 9 +2 ☔ View full report in Codecov by Sentry. |
This reduces unnecessary calls to the device when we already know the device has no support for it.
Summary by CodeRabbit
Bug Fixes
Refactor
Tests