-
-
Notifications
You must be signed in to change notification settings - Fork 37
Rewrite wled library #1334
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
Rewrite wled library #1334
Conversation
|
Warning Review failedThe pull request is closed. WalkthroughThe updates broadly enhance the WLED control and upgrade functionality. Key changes include toggling device power, fetching and applying the latest firmware versions, integrating new dependencies, and revising enumerations and model classes. Various improvements were made to handling device states, error management, and test refactoring to maintain robustness. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Script as control.py
participant WLEDDevice
User->>Script: Execute script
Script->>WLEDDevice: Fetch current state
WLEDDevice-->>Script: Return state
alt Device is ON
Script->>WLEDDevice: Turn OFF
else Device is OFF
Script->>WLEDDevice: Turn ON
end
Script->>WLEDDevice: Fetch updated state
WLEDDevice-->>Script: Return updated state
Script->>User: Print updated state
sequenceDiagram
participant User
participant Script as upgrade.py
participant WLEDReleases as ReleaseAPI
participant WLEDDevice
User->>Script: Execute upgrade
Script->>ReleaseAPI: Fetch latest versions
ReleaseAPI-->>Script: Return versions
alt Stable version available
Script->>WLEDDevice: Upgrade to stable version
else No stable version
Script->>User: Inform about unavailability
end
Script->>WLEDDevice: Update device info
WLEDDevice-->>Script: Return updated info
Script->>User: Print updated info
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1334 +/- ##
==========================================
- Coverage 58.56% 57.09% -1.47%
==========================================
Files 4 6 +2
Lines 613 641 +28
Branches 139 128 -11
==========================================
+ Hits 359 366 +7
- Misses 233 271 +38
+ Partials 21 4 -17 ☔ View full report in Codecov by Sentry. |
|
| MIN_REQUIRED_VERSION = AwesomeVersion("0.14.0") | ||
|
|
||
|
|
||
| class LightCapability(IntFlag): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frenck
The values seem incorrect (https://kno.wled.ge/interfaces/json-api/#light-capabilities), can you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already there and not part of this PR. If you find an issue, please create an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I'm going to do that, ty



Proposed Changes
🚨 As of this PR WLED 0.14.0 is the minimum version required for this library.
SSIA
Note: There is still a lot to do, optimize and clean up. This PR is large enough and shippable. Next iterations can be done in smaller PRs.
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
orjsonfor better performance and reliability.New Dependencies
mashumaroandorjsondependencies.Documentation
Tests