-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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 ColorMode.WHITE when Tuya bulbs support white but don't have temp_value #126242
base: dev
Are you sure you want to change the base?
Conversation
Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
afc2cc2
to
f8e609d
Compare
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 is very much a draft and needs more testing with other bulbs. I have tried to avoid any breaking changes though. I will clean up the logging and comments later. |
ba38808
to
3179b95
Compare
6f30e16
to
5170faf
Compare
62d0f15
to
8f5f868
Compare
Functional testing has been completed by myself and @bartplessers. |
@MartinHjelmare @frenck , I cannot add the |
dac0e63
to
a39b25b
Compare
7cfc2c9
to
3c9533c
Compare
@MartinHjelmare @frenck, the @homeassistant bot is still marked as requesting changes related to the cla signature which i've fixed. I tried "Re-request review", but it didn't seem to do anything. Please advise! Thanks. |
It doesn't... |
@frenck |
f6c6af2
to
e010117
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
e010117
to
f558750
Compare
beb3be8
to
8c9a376
Compare
I will give this a review as well but we need an approval from a maintainer. |
bd153ec
to
bdf5097
Compare
Can you guide on on how I would test this on my local installation? |
See the bottom of my comment |
What is required to get this merged? I'm willing to help... but it seems like it might have just gotten stalled. Is it just waiting on a review from @frenck? |
Patience. Thanks 👍 |
…not have temp_value
bdf5097
to
28480ae
Compare
Tuya: Add ColorMode.WHITE when bulb supports white but doesn't have temp_value
Breaking change
N/A
Proposed change
Tuya bulbs that support a white color mode but don't have adjustable white color temp were broken several versions of HA ago. See this large thread.
I added a check after the check for color temp to check if the bulb supports work_mode white. If the bulb does not support color_temp, but it still supports white work_mode, I will add ColorMode.WHITE to the list of supported color_modes. I also added a new entity value _white_color_mode which will hold the color mode corresponding to how the bulb supports white. It will either be WHITE or COLOR_TEMP.
Modified the turn_on function to check for ATTR_WHITE as well as ATTR_COLOR_TEMP in determining if the command should include setting the work_mode to WHITE. If the _white_color_mode is COLOR_TEMP, it will also set the color temp in the commands.
Modified the color_mode function to return the _white_color_mode when the work_mode is white. Again, this can be either WHITE or COLOR_TEMP.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: