-
-
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
2024.4 Tuya integration: lights white/color mode not updated #115056
Comments
extra info: after some investigation, I noticed that this problem only occurs with Tuya lights that only support [white + color] |
Are you sure this light has the capability to change color temperature? Or does it have only white + color?
Seems that HA is not aware anymore of the white capabilities of the bulb if it does not support colortemp (CCT) |
Hi everyone, I installed a previous version of HA (2023.3.1) on my proxmox server. Here this problem does not occur.
What I did:
Version 2024.3.1: shows the correct state of the bulb |
FYI @Kelso-Utah |
Here is some other interesting thing: What you can see here: same light, but other version of HA: HA 2024.3.3HA 2024.4.2So it seems that HA 2024.4.x does not recognize the "brightness" modus of this tuya bulb! |
I got same problem. |
Created a new issue on |
Yup, I started suffering from this recently, "supported_modes" comes back only with "hs", whereas a few weeks ago it was coming back with "brightness" as well. Except even then I couldn't actually change to "brightness" from turn_on - once HA set the light to "hs", it was stuck in "hs". Now it's stuck in "hs" every single time I make any sort of change from HA. I am suspicious of 770e48d. |
With 770e48d, it looks like WORK_MODE must be "white" to get brightness. How do I work out what device.category is of my particular devices? EDIT: looks like category == "dj" from device info > device diagnostics. And I can see data.status.work_mode = "white" whenever the tuya app was the last set to white, and HA hasn't come along and fiddled with the settings yet. Alas, as soon as HA fiddles with the brightness (not just power - power toggle leaves the settings as they were), data.status.work_mode reverts to "colour" (I praise the developers for their proper spelling of "colour"). I can't find a way of getting work_mode back into "white". Also, the GUI can't do it, which tells me it's not my fault. |
device info > device diagnostics 2023.3.32024.4.3 |
@spacelama To me it seems that following logic is missing in latest version |
hi @emontnemery, @kamaradclimber, @lellky , @Orhideous , @MartinHjelmare Do you mind taking a look at this issue? |
Hi! Sorry, but I don't think I can help. I review the linked PR, but I have no understanding of the inner workings here. /Lellky |
FYI. Problem still exist in 2024.4.4 |
hi @homeassistant , is there any way to add the label "integration: tuya" to this issue? On other issues, I see Maybe the bot is not triggered because initialy I forgot to mention the integration in the OP...? |
Experiencing this issue and it's only for lights that have white +RGB (no white temperature). Since upgrading to 2024.4, five of my lights only show HS colour mode and randomly go to the RGB lights when triggered by HA. The tuya app can change them back to white but goes back to RGB due to HA (even when the automation is only to turn on with no other settings) |
same problem on 2024.5.0 Please can somebody give this some attention. I really want to upgrade, but this tuya issue prevents me from doing this :-( |
Hi @Kelso-Utah , What do you exactly mean with Smartlife integration? So I'm a bit confused... |
Hi @Kelso-Utah , thanx for pointing me in the good direction! The Good
The Bad
The Ugly
So it was good testing this, but it can't be the final solution. Thanx again, |
2024.5.1 I need some Xanax |
the issue must be fixable, it's only become and issue recently. |
I too experience this since starting HA server right at version 2024.4 so I therefore never saw the White mode in those. In fact, it caused me some grief trying to figuring out what I was doing wrong until some search indicated the issue to be a newly introduced bug. In Tuya, there is a specific tab for me to set White mode and brightness while the other allow color selection. The bulb switch automatically that way. If I use tuya to open white 80%, all is fine and I can switch to any color/level or use scene. In Tuya I can do any color and brighness but cannot activate while mode, when trying the bulb light up yellow 100% (which is way dimmer than white mode). If I set the bulb in white in Tuya than only use Toggle/On/Off in HA it will allow to switch. But changing any parameter in HA cause the bulb to go into color mode instead without being able to return to white mode from within HA trigger. It just seem that White mode is not exposed to HA. Zak |
Given the fact that all of my Tuya bulbs are affected by this, this is extremely annoying. Had to downgrade to core 2024.3.1 to make this all work. Would it be possible to fix this by some other way? Create a custom script or whatever that takes care of the Tuya bulbs? I'm currently using 12 Gosund WB4 bulbs soooooooo yeah. Has anyone had any luck setting up local Tuya with these? |
2024.5.3. Still same problem |
@bartplessers , since no one's actively working on the problem, updating this issue at every single release isn't going to achieve anything other than contribute noise to the issues database. I did briefly look at reverting the commit we brought into question, but reverting that and likewise going back to the previous version of the code didn't fix the problem for me, but I'm not yet confident that I was correctly running the code in my testing container. |
can you investigate this further? I'm not a developer, but not afraid of VSCode and git. Is there a good newbie tutorial how to revert that piece of code and run it in a sandbox? Grtz |
config_entry-tuya-01J59FD7RAWQ4KDPXCADH5MM4G.json @frenck Sorry for the late reply. I forgot I commented on this |
@frenck Hi. Just checking in to see if you've had a chance to look at the additional 7 .json diagnostics. Can you provide an update? Hope you had a good Holiday. |
Running 2024.9.1. Still no progress on this. Same with HA: in a fit of overconfidence I upgraded and my whole house was an amusement park (when dimming all the bulbs turned to color mode) Downgraded again, but it is a bit ironic that Home Assistant claims to be a cloud-independent solution, and that I had to rely on the cloud Tuya app to control my lights at that moment... Please, fix this. We really need a solution and I think this is not that hard as some smart people already pinpointed the root cause in the code. Let me know if I can be of any help! kind regards, |
Just another user signing in, ever since #110327 Tuya bulbs with a single CCT chip are broken. |
Same problem here. |
Remember to upload your diagnostic .json file for the Tuya Integration. Please. |
Here you go: |
Just noticed that my Tuya garden lights constantly turn on with blue as default color instead of the warm white (which I configured last year winter). I'm experiencing the same issue and I've been unable to set the lights to (warm) white [color mode] via the different ways HA provides (device -> turn on light / Lights: Turn on -> select entitiy, tried to add some extra data, but wasnt succesfull / tried to force set the state via developer tools, didnt work). Attaching my diagnostics file here as well for the affected device. Tried to set the correct color using the default (cloud based) Tuya integration. tuya-3077369237d3a6a2922f767502c275a0-Tuinverlichting-c4485b26f5183b96b0043f45ccb732b1.json I do see 'white' being a work mode in the json file, next to colour, but am not able to use/set it:
|
Looking into the issue to hopefully help anyone working on this. First thing I notice is that the bulbs support Additionally, I don't see anywhere in the The light can never be changed to Looking further, I thought I could find a workaround by deliberately bypassing the section of the
By performing a "Light: Turn on" action from the UI that did not set the
I thought that even though I expected it to not touch the color mode, leaving it as it was in the "white" mode before, and only sending the commands to turn on the light and to set the brightness. Another issue is that Other people have pointed to After looking at all this, I think one of the issues is that the device info, as shown in all the attached diagnostics, does not have the |
Can you explain in detail how you were able to override, the Tuya Integration with your changes? |
I was not able to bypass it. I thought I could by passing in the described action data, but it did not work. the bulb still changed to color mode. I am very confused as to why it still changed to color mode though. I do not have visibility into what the |
Maybe my question wasn't 100% clear? I am wondering how you load the custom integration to be able to test any of these procedures. Did you copy the entire Tuya component to the custom_components folder? If so, how did you load the custom component? Was it through HACS? |
I did not do this. I was simply digging through the code to try to understand where the issue(s) could be. |
Ok. I've seen comments on other posts about "overriding" integration components but when attempting to override the Tuya, I am not successful. I've been trying to install the integration from v3.3 (last working version) while maintaining the current upgrades to H.A. |
I will see if i can install a custom version of tuya and then tinker with it. I would like to add logging to see more of what's going on. |
I was able to add tuya as a custom integration and I added a log line to the beginning of
The output shows that there is no
I get the following log statement:
With the relevant portion being the
Somewhere, somehow, the kelvin attribute in the action is getting converted to an HS color (fairly accurately also, it's not random). If i only pass brightness in the action data, then the
Resulting
To answer your earlier question, how did I add Tuya as a custom integration? I saw this comment then Git clone'd home assistant core. Modified the light.py file and added |
This is perfect. I'm going to try this now. |
Hello again, I have been tinkering with it and I have a working solution at least for the bulbs that I have. I do not have any Tuya bulbs that support color temp, so I can't be sure that I didn't break any existing bulbs. I am requesting here that people pull my code and test it out if they can as an initial functionality review. I will then submit it as an actual (non-draft) PR on the dev branch and have it formally reviewed. Please provide feedback!! Hope it works for you! |
@wedsa5 Thank you for submitting this info. If you want a version of the Tuya Light Integration to compare to the current (broken) version, you can download the attached .zip file below. I'm not the best programmer in the world but I believe this has something to do with the broken version. @bartplessers This info may help. @frenck Please provide guidance... or ANYTHING. Communication is important and being left in the dark about a 6 month-old issue is very frustrating. Thanks to @wedsa5 explaining step-by-step how to correctly override the integration, here is what I did to get my bulbs working while maintaining the most current updates from Home Assistant (2024.9.2).
|
@Kelso-Utah, thanks for the more detailed instructions for adding the custom integration. This should help others when installing it. Additionally, could you please install the code from my PR to test if you can use all the functionality of your bulbs? I would like to have the feedback. Please comment on the PR once you've tested it to give feedback on how it functions and if you have any comments on my code.
I actually don't think this is the issue as i described in my earlier comment. excerpt:
I believe That's why my PR adds code to add the color_mode If you have a bulb that does support color temperature, then your bulb should get the color_mode |
Hi @wedsa5 , @Kelso-Utah , thanx a lot for all your efforts on this! much appreciated. #1 #2
--> Tuya could not start anymore. Error:
#3
rebooted, and yezz, up-and running Findings for now: everything works at first sight!!!! Small issues:
Apart from those minor issues, I'm sooooooooooooo happy there is finally some progress on this issue. kind regards, |
@bartplessers , thank you for testing this!! I'm glad to hear that the CCT bulbs are working as expected. Regarding the icon differences, I think this is as expected. CCT bulb will get As for clicking the "W" for the white-only bulb while still looking at the color picker, I see the same behavior. I agree that it should switch over to the brightness slider rather than still showing the color picker, I believe this is functionality independent of the Tuya integration and would be at the UI or Light integration and I dont see this as a bug. Finally, can you explain exactly what you changed about my light.py file to get it to work? It looks exactly the same to me. If there is something to fix, can you leave a comment on the PR? Thanks. I am going to move the PR out of draft status for an official review. I am not sure if I'm required to add tests or not, and I've been having issues getting my dev environment correctly setup, so we'll see how that goes. Thanks again! |
@wedsa5 Additionally, I saw in this thread that someone noticed they had an issue with their garden lights. I think I recall seeing a section of code related specifically to garden lights (line 260 - Smart Gardening System). Do you think that section of code is an issue like our CCT lights or do you think the changes you have proposed addresses their issue also? Thanks again, |
Hi @wedsa5
The file you provided on
I had to change this to
|
@Kelso-Utah, I believe my change will fix the garden lights as well. The attached diagnostic is similar to my lights in that they have the @bartplessers, interesting that you had to change that. I am going to leave that import as-is in the PR since I did not need to modify that line from the original file and chalk it up to an environment thing on your end. 🤷♂️ |
What's the status of the proposed fix? |
Unable to test as I am not going to move into development. When will this solution be implemented / looked at. Very frustrating having all the downlights in the loft not working correctly in HA. |
Tested on TY-02-4CH (RGBW controller) and works well |
The problem
Hi,
Since HA 2024.4.0 I noticed that HA does not show the color mode correctly of my Tuya bulbs.
So
This makes that all my Tuya bulbs become more or less useless in HA:
Anybody same problem?
Any solution?
Kind regards,
Bart Plessers
What version of Home Assistant Core has the issue?
core-2024.4.1
What was the last working version of Home Assistant Core?
core-2024.3.x
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tuya
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tuya/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: