-
Notifications
You must be signed in to change notification settings - Fork 15
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 temperature scaling for Tuya lights #17
Open
louisjennings
wants to merge
21
commits into
dominikberse:master
Choose a base branch
from
louisjennings:temperature-scaling
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add temperature scaling for Tuya lights #17
louisjennings
wants to merge
21
commits into
dominikberse:master
from
louisjennings:temperature-scaling
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
louisjennings
changed the title
Temperature scaling
Add temperature scaling for Tuya lights
Aug 11, 2023
Sorry for the late reply, I did not have the time to look into this project lately. I would like to merge this if possible, but I currently don't have the time to look into the conflict. If you are still interested in merging this, I would appreciate it, if you had a look at this. Also, I assume this will use the python-bluetooth-mesh branch by Minims? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a pull request to resolve issue #16.
As far as I can tell, rather than using the
CTL Temperature
field to directly set the temperature of the light, it maps the value of temperature from 800 to 20,000 K to a temperature between its own minimum and maximum (say 3,000 and 6,000 K for simplicity). As an equation:light_temperature = 3000 + (message_temperature-800) * (6000-3000) / (20,000-800)
In effect this means that changing the temperature within the 3000 K to 6000 K exposed in the UI results in negligible change in the output colour (~3340 to ~3810 K).
The fix applies the inverse scaling function when a configuration variable is set to true. The pull request also includes changes from another fork (upon which my fork is based).