Sudden Problems With Tuya Smart Life Lights

Hey, I have had some teckin tuya wifi lights in my living room for a couple months now but all of the sudden overnight home assistant seems to have lost the ability to control their color. I have two different models of the same type of tuya light (one older that doesn’t support controllable temperature and one newer that does). Both don’t seem to be working properly but I can still toggle the newer models as well as control their brightness and warmth, but I can’t control the older model at all now. It seems to just totally have stopped recognizing the lights as having a color feature for some reason, but I can still control their color through the smart life app and the google home app. Anyone else experiencing this? I would love to hear your thoughts on the problem and suggestions on how to fix this because I will have a very frustrated roommate on me about this.

1 Like

Same problem here

This is what I have to work with in the logs

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 286, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 418, in state_attributes
    data[ATTR_BRIGHTNESS] = self.brightness
  File "/usr/src/homeassistant/homeassistant/components/tuya/light.py", line 43, in brightness
    if self.tuya.brightness() is None:
  File "/usr/local/lib/python3.7/site-packages/tuyaha/devices/light.py", line 16, in brightness
    brightness = int(self.data.get('color').get('brightness') * 255 / 100)
AttributeError: 'NoneType' object has no attribute 'get'
1 Like

ok, now all my newer model lights are showing as unavailable?

You can set the lights mode to white in the Tuya app
Refresh home Assistant and the lights will be visible again

Ah, got it thanks. I’m guessing no news on the color problem?

I confirm the same problem here.
I guess they changed something in their API…color mode just stopped working :frowning:

Came here to see if i was the only one having an issue… Dang guess its an api/tuya issue

Same problem here as well, since yesterday… Also if you see the tuya component on github, there have been some changes since like 18 days ago, but it may have updated the component on HA right with the new update… The question is when are they gonna fix, or how can we roll back the update…?

1 Like

How do you changed the lights mode to white? Maybe I have the wrong app.

Adding to this as well… my 2 Merkury branded Tuya bulbs where working fine Tuesday, and then suddenly Wednesday morning color control disappeared from HA.

Edit: I was able to patch the file as described in the above issue on Gtihub. It gets color working again, but the state is not reflected in Home Assistant.

when you say the state is not reflected in Home Assistant do you mean the state of the color or the general state of the lights?

Same problem, Hassio last version and last version of home assistant. How do you replace the light.py file with the one with the patch? what is the procedure? thanks

I can confirm this is also an issue for me with my 12 Tuya (Aoycocr BR30) bulbs. They worked fine for the last 6 weeks and now when they are turned on in “color” mode they become unavailable in the HA UI. They are still accessible and controllable via the Tuya AP. Currently running in a VM HassOS 2.12 - HA 0.103.2

I have the same problem with some Feit BPA800 bulbs. They had an option to change color until a few days ago.

Same issue here with an Avatar color bulb controlled by Smart Life. Worked in HA until a few days ago, but now HA can’t control it, even though it still sees the bulb as available. I did not update the bulb firmware or HA, so the difference must be in the Smart Life server.

A few more bits of information:

  • Only my color bulb is affected. Other Smart Life devices continue to work, including a White bulb.
  • The Smart Life Android app still works. I did notice a new setting in Smart Life to designate the bulb as Color or White, so I tried changing it to White, and now HA can turn it on and off again, but doesn’t see color and doesn’t see the state of the bulb.
  • Alexa and Google Home continue to work, and can control the bulb and set the color - even with the bulb set to White.

Both. Even with the bulb set to White in the Smart Life app.

This patch does the job

Replacing light.py with G33kDude’s patched version did not work for me initially - the Tuya component fails to initialize and all Smart Life devices become unavailable. But I just edited his changes into my original light.py file, and it worked then, so probably just some minor version difference in the content of the light.py file. I didn’t bother investigating further since the changes were effective.