Skip to content
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 shows wrong color mode #116326

Closed
bartplessers opened this issue Apr 28, 2024 · 15 comments
Closed

2024.4 Tuya integration shows wrong color mode #116326

bartplessers opened this issue Apr 28, 2024 · 15 comments

Comments

@bartplessers
Copy link

The problem

Hi,
Since HA 2024.4.0 I noticed that HA does not show the color mode correctly of certain Tuya bulbs,
The problem only raises for bulbs that support white and color modus, without the abality to change the white color temperature

Than

  • on/off is correctly displayed
  • when I change color in HA: state icon in HA shows the selected color, bulb switches to color mode
  • when I switch back to white modus in the Tuya app (I can’t switch to white modus in HA): the color of the icon in HA remains in color modus although the bulb works now in white modus
  • on/off works in HA, but when I want to change the brightness in HA, the old color modus is sent to the bulb

This makes that all my Tuya bulbs become more or less useless in HA:

  • I can’t switch to white modus in HA
  • I can’t dimm my lights because than they switch to a random color modus

Anybody same problem?
Any solution?

PS. I'm creating a new issue here because #115056 was not picked up by the @homeassistant bot

What version of Home Assistant Core has the issue?

core-2024.4.0

What was the last working version of Home Assistant Core?

core-2024.3.3

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

I filterd logs on device bf9447a3e3f58bed9af04x

HA 2024.4.4 (with issue)

home-assistant_tuya_2024-04-28T10-39-58.635Z.log

HA 2024.3.3 (no issue)

home-assistant_tuya_2024-04-28T10-45-09.326Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

You can find more detailed information in #115056
The main issue is that since HA 2024.4.x, it does not recognize the "brightness" modus of this tuya bulb!

What you can see here: same light, but other version of HA:

HA 2024.3.3

321386787-00033c84-93c4-4601-ad1d-3c8cd1ed204c

HA 2024.4.2

321386887-c9660b91-c05e-4a96-a6ce-4eb9d2dca554

So it seems that HA 2024.4.x does not recognize the "brightness" modus of this tuya bulb!

I have a feeling that this problem was introduced with
#110327
resulting in
770e48d

To me it seems that following logic is missing in latest version
323729519-428aff4c-2694-4af7-bdf5-d68fe072e229

@home-assistant
Copy link

Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tuya can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tuya Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tuya documentation
tuya source
(message by IssueLinks)

@ph30n1x
Copy link

ph30n1x commented May 1, 2024

I am also having experiencing this issue with 5 lights. This was not previously an issue, appears to have originated with the 2024.4 release.

@bartplessers
Copy link
Author

same problem on 2024.5.0

Please can somebody give this some attention.
I'm also using zigbee2mqtt. There is a new release https://github.com/Koenkk/zigbee2mqtt/releases/tag/1.37.0 but ...
this release requires at least Home Assistant 2024.4.

I really want to upgrade, but this tuya issue prevents me from doing this :-(

@ph30n1x
Copy link

ph30n1x commented May 3, 2024

Please roll back the changes, this clearly wasn't fully tested and is affecting a specific type of device. As the tuya integration is part of core this needs to be rectified

@bartplessers
Copy link
Author

just for your interest: originally I created #115056 . @Kelso-Utah provided a workaround, but only for very urgent cases, because the provide solution is "This project will no longer continue to iterate"

@bartplessers
Copy link
Author

Problem still exist in 2024.5.1
I'm not a developer, but can somebody try to revert the following code:
770e48d

I think this is missing:
323729519-428aff4c-2694-4af7-bdf5-d68fe072e229

@bartplessers
Copy link
Author

2024.5.3. Still same problem

@nollid3
Copy link

nollid3 commented May 11, 2024

I have the problem as well. Would be nice to have it fix in this months releases

@ph30n1x
Copy link

ph30n1x commented May 22, 2024

Is this issue being investigated? This code change introduced issue breaks the whole point of having HA in my situation and is causing grief. How did a change go through without notification in the release notes? Once items were moving into core, i would of expected changes to be a lot more controlled.

@bartplessers
Copy link
Author

Is there any way to set this on the roadmap? It' really annoying to be stuck on version 2024.3.3 and not able to upgrade without braking my whole smarthome... :-(

@ph30n1x
Copy link

ph30n1x commented Jun 14, 2024

Ok I believe I have found the root cause of the issue (quite annoyed that the developers haven't looked into this). In commit #110327 Line 508 the function filter_supported_color_modes is introduced / used for the first time. That specific function removes ColorMode.BRIGHTNESS from the list provided to it.
By removing ColorMode.BRIGHTNESS it breaks the functionality for Tuya lights that have separate colour and CCT LEDs within the same light.

@ph30n1x
Copy link

ph30n1x commented Jun 15, 2024

Ok on an initial test HA returned the following error, so it appears there is some group forcing changes to removing color modes that some device require, for example our RGB+CCT lights. Its is affecting multiple integrations (for example Wiz) and I think that is why the developers are ignoring these bug reports. I am now close to ditching Home Assistant if these kinds of short sighted changes are being made to fundamental integrations. Where is the documentation stating these changes and their reasoning??

Logger: homeassistant.components.light
Source: components/light/init.py:1162
integration: Light (documentation, issues)
First occurred: 1:38:57 PM (20 occurrences)
Last logged: 1:38:57 PM

None (<class 'custom_components.tuya.light.TuyaLightEntity'>) sets invalid supported color modes {<ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.HS: 'hs'>}, this will stop working in Home Assistant Core 2025.3, please report it to the author of the 'tuya' custom integration
None (<class 'custom_components.tuya.light.TuyaLightEntity'>) sets invalid supported color modes {<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.BRIGHTNESS: 'brightness'>, <ColorMode.HS: 'hs'>}, this will stop working in Home Assistant Core 2025.3, please report it to the author of the 'tuya' custom integration
None (<class 'custom_components.tuya.light.TuyaLightEntity'>) sets invalid supported color modes {<ColorMode.COLOR_TEMP: 'color_temp'>, <ColorMode.BRIGHTNESS: 'brightness'>}, this will stop working in Home Assistant Core 2025.3, please report it to the author of the 'tuya' custom integration

ph30n1x referenced this issue Jun 15, 2024
* Simplify color mode logic in Tuya light

* Remove exclusion from LightEntity.__should_report_light_issue

* Fix test
@edmund-1
Copy link

edmund-1 commented Jul 5, 2024

I have the same issue with all my Tuya lights (white + color + dimming)

@bartplessers
Copy link
Author

I have the same issue with all my Tuya lights (white + color + dimming)

Hi @EdSpatariu
Maybe you can better comment on
#115056

Grtz

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants