Core: Tuya light not color control in the user interface

Created on 1 Jan 2020  路  32Comments  路  Source: home-assistant/core

Home Assistant release with the issue:
0.103.5

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io
Raspberry Py 3B+

Integration:

Description of problem:
Following update 0.103.0, I no longer have the color management interface in the user interface.
image

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

tuya:
  username: xxx
  password: xxx
  country_code: 33
  platform: smart_life

**Traceback (if applicable):**

```

Additional information:

tuya

Most helpful comment

Another bump to get G33kDude's patch pushed live. I think there are a lot of people with Tuya who got this issue.

All 32 comments

I think #30311 #30087 #28602 are all related

Related issue on tuyaha package: https://github.com/PaulAnnekov/tuyaha/issues/17

Same issues here

Issue is still around with 104.x... This patch seems to resolve issues on short term...

https://github.com/home-assistant/home-assistant/issues/28602#issuecomment-567312976

The fix in above comment does indeed work, got to patch it yourself

Just got a Tuya device and found the same issue. It is also not returning the current brightness, it is showing brightness slider all the way down. Brightness control works, just doesn't show current value. Unsure how to patch this myself, new to HA just running Hassio.

Home Assistant 0.104.3

2020-02-04_123807

Any word on fixing this? There is a patch that fixes the issue mentioned in a comment here: https://github.com/home-assistant/core/issues/28602#issuecomment-567312976
Right now all the Tuya lights that have color no longer have color options.

I've tried the patch that's supposed to fix it, but no successful resolution with the patch.

@anthonyrhook I'm sorry the patch file is not working for you. I'm still using the one I provided (light_patch.py) and it's working well. Could you talk a bit about your HA installation and how you applied the file?

Another bump to get G33kDude's patch pushed live. I think there are a lot of people with Tuya who got this issue.

I have the same issue with a Tuya RGB led strip on version 0.108.3 of HA.

@anthonyrhook I'm sorry the patch file is not working for you. I'm still using the one I provided (light_patch.py) and it's working well. Could you talk a bit about your HA installation and how you applied the file?

I have tried the patch provided by @G33kDude in his comment and it appears to fix the issue with the color picker not showing.
The brightness value is still inaccurate (always 40), but that is probably another issue.

image

@anthonyrhook I'm sorry the patch file is not working for you. I'm still using the one I provided (light_patch.py) and it's working well. Could you talk a bit about your HA installation and how you applied the file?

Sure thing! I've got a supervised install -- I grabbed the Tuya components from github, and replaced them in custom_components, included file with the patched file, following this comment on bug #28602.

If this patch is the correct fix, what do we need to do to get it merged so everyone gets the fix? If it's not the correct fix, what needs to be changed?

He intentado el parche que se supone que lo arregla, pero no hay una resoluci贸n exitosa con el parche.

yo tampoco no he conseguido nada

Have same issues with no rgb controls and brightness not being read correctly from the service. Hope this integration is not abandoned...

Hi
I have followed instruction written here home-assistant/core#28602

To use this, you will need to download the Tuya component from here
https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/tuya
and add the folder to your custom_components folder, replacing light.py with my modified version.

I create a folder called tuya
custom_components/tuya
and copied the original files into it
I renamed the light.py to original_light.py
and then I copied your version into the same folder

I then physically powered off my Raspberry Pi 3B+ running Hassio

Unfortunately the light panel still does not show the color wheel.

Please let me know if I have done this correctly, or if there is anything I need to change.

I've follow these steps and still it's not working as well.

me too, still got the problem

Still an issue, Home Assistant 0.110.2, Lumary LED strip (division of Tuya, works with a Tuya account) I have brightness and on/off controls but no color picker.

image

Confirmed for me too, the problem is still present

Some further information: When I override the supported features flag to include SUPPORTS_COLOR = 16 (so, anything with a bitwise value containing 16), then when I go to change the color on the frontend I get the following error:

Failed to call service light/turn_on. int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Updated to 0.111.4 - issue is still there.

Update 0.113.0 - issue is still there.

There is a way to force it to show up and then the color picker will work. If you go to Configuration > Customization > [select your entity] the very last parameter is "supported_features" edit it and set it to 63.

There is a way to force it to show up and then the color picker will work. If you go to Configuration > Customization > [select your entity] the very last parameter is "supported_features" edit it and set it to 63.

That worked great! Thank you very much!

There is a way to force it to show up and then the color picker will work. If you go to Configuration > Customization > [select your entity] the very last parameter is "supported_features" edit it and set it to 63.

Can confirm, that worked here as well.

@skynet01 Do you perhaps know the supported features number to enable effects?

@skynet01 Do you perhaps know the supported features number to enable effects?

I believe it might be 191 which will add all the options not sure if they will work though

When I change supported_features to 63 and change a color, I get the following error:

Failed to call service light/turn_on. int() argument must be a string, a bytes-like object or a number, not 'NoneType'

I'm using this Tuya-compatible Lumary product: https://www.amazon.com/dp/B07V3R436B/

Any ideas?

I get the same behaviour as @qJake

There is a way to force it to show up and then the color picker will work. If you go to Configuration > Customization > [select your entity] the very last parameter is "supported_features" edit it and set it to 63.

I don't get the Customization option. I have tried in the Developer Tools instead but the color wheel appears then disappears and "supported_features" resets itself back to 3. How can I do it?

Using Home Assistant 0.114.4

The Customization option can be accessed when you click on Configuration (its the last option on the list). You can also go to it directly http://your_homeassistant_url/config/customize. Alternatively, there is now a custom Tuya component where you can force the color option. It also fixes a few other bugs with native tuya component

Was this page helpful?
0 / 5 - 0 ratings