-
-
Notifications
You must be signed in to change notification settings - Fork 28
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 CCT support #1367
Add CCT support #1367
Conversation
WalkthroughThe latest update enhances the WLED library by introducing control over the white spectrum color temperature (CCT) for lighting segments. This is achieved through the addition of a Changes
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 Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/wled/models.py (1 hunks)
- src/wled/wled.py (3 hunks)
Additional comments not posted (2)
src/wled/models.py (1)
290-295
: The addition of thecct
field to theSegment
class is well-implemented and consistent with the project's coding standards.src/wled/wled.py (1)
330-330
: The integration of thecct
parameter in thesegment
function is correctly implemented. Ensure to verify the actual behavior on the device to confirm that the color temperature adjustments are applied as expected.Also applies to: 359-359, 388-388
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/wled/models.py (1 hunks)
- src/wled/wled.py (3 hunks)
Additional comments not posted (4)
src/wled/models.py (1)
290-295
: LGTM! The addition of thecct
attribute is well-documented.The new attribute
cct
for controlling the white spectrum color temperature is appropriately added with a clear docstring.src/wled/wled.py (3)
330-330
: LGTM! The addition of thecct
parameter is well-integrated.The new parameter
cct
for controlling the white spectrum color temperature is appropriately added to thesegment
function with a clear docstring and correct integration into the arguments dictionary.
359-359
: Docstring update is clear and concise.The docstring update to include the
cct
parameter is clear and concise, explaining its purpose effectively.
388-388
: Parametercct
correctly integrated into the segment dictionary.The
cct
parameter is correctly integrated into the segment dictionary, ensuring it is part of the state change when invoked.
PS: The CI is failing, can you take a look at that as well? |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/wled/models.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/wled/models.py
@frenck thank you for the review, I fixed the CI failing and applied the proposed change |
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.
Thanks, @Suxsem 👍
../Frenck
Proposed Changes
This minor PR adds cct support to segments.
Tested with the following code and temperature changes indeed
Related Issues
#1294
Summary by CodeRabbit
cct
) from 0 (warmest) to 255 (coldest).cct
parameter in segment-related functions.