Fix wrong setting of free_range after reset or restart (#8120) #8253
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Internally, Cold/Warm white works in two modes.
In the standard mode, the total power for both white channels is limited to 100% to avoid overloading the power supply. Internally both channels are set so that their sum is 255, and the brightness is adjusted with Dimmer. Any
CT
command will force standard mode.However there is a free_range mode where you can set both channel to arbitrary values and push both channels to 100% (for a total power of 200% - use at your own risk). The only way to do so is to use the
Color xxyy
value. free_range mode happens when the sum of both xx and yy exceed 255 (actually 259 to avoid rounding errors). As soos as you use theCT
command, you go back to standard mode.Dimmer
does not change standard/free_range mode.The bug was that after
Reset 5
, after first flash or after Restart, the bulb was wrongly in free-range mode. This is now fixed.After
Reset 5
the default value is CW=10%, WW=0% (i.e. CT=153, Dimmer=10).Related issue (if applicable): fixes #8120
Checklist: