Closed cbrst closed 6 years ago
I have the same problem with Yeelight
So I checked the log in HA when changing color via HA web interface, and it seems to be calling set_rgb. Then I checked light.js
It seems that the failure happens because it tries to set XY color. If I ignore the check for XY_COLOR and just set RGB, it works fine. Just commenting line 344,345,346 and 348 works for me.
So the problem is, are Yeelight indicating that it supports XY color when it does not, or does HA has a bug with XY color setting. HA seems to be just calling set_rgb.
i'm still having the same problem with the Yeelight bulbs. I've tried these fixes but it is still trying to use Hue and XY colors instead of RGB. Is there a fix for this yet or I am still doing something wrong?
I am facing the same problem with a OSRAM RGB Flex strip
how would i comment that out?
This worked for me.
@Pickowicko - on hassbian I had to edit this file: sudo nano /usr/lib/node_modules/homebridge-homeassistant/accessories/light.js
I removed the lines mentioned by @honcheng and it works perfectly now. Thank you!
The solution without changing the code is:
Changes from UI will be put in customize.yaml
.
Or you can put the following configuration in customize.yaml
in .homeassistant
directory.
light.YEELIGHT_DEVICENAME:
supported_features: 63
Reload config on Homeassistant web UI -> Configuration tab -> General -> Reload Core
63 is a calculation of SUPPORT_YEELIGHT | SUPPORT_RGB_COLOR | SUPPORT_EFFECT | SUPPORT_COLOR_TEMP
without SUPPORT_XY_COLOR
, which you can find in Homeassistant source code.
Solution works also fine with Miilight (limitlessled). You solved my issue! THANKS!
Please submit a bug report to the Home Assistant repository.
Did this ever get reported to Home Assistant? I have searched the issues and not found anything, and I am having the same or a very similar issue.
Hass.io running Home Assistant (0.65.4) and Homebridge (2.3.0), updated to latest versions.
Error with supported_features: 63
in home bridge logs
[2018-3-15 17:35:20] [HomeAssistant] Successfully set hue on the 'Kitchen Under Counter' to 121
[2018-3-15 17:35:20] [HomeAssistant] Successfully set rgb on the 'Kitchen Under Counter' to 0,0,0
Same error with nosupported features
in home bridge logs
[2018-3-15 17:43:39] [HomeAssistant] Successfully set hue on the 'Kitchen Under Counter' to 124
[2018-3-15 17:43:39] [HomeAssistant] Successfully set rgb on the 'Kitchen Under Counter' to 0,0,0
and in Home Assistant logs
Error when calling <function YeelightLight.set_rgb at 0x73974e40>: {'code': -5000, 'message': 'general error'}
Error when calling <function YeelightLight.set_default at 0x73974f60>: {'code': -5000, 'message': 'general error'}
All controls work in Home Assistant through web ui (on/off + brightness + temp + colour). Some features work in Home app on iPhone (on/off + brightness + temp) however colour does not work - this is where the errors happen.
Thanks for any assistance. I have not yet resorted to changing files, which seems a bit extreme. Before Home Assistant (just using HomeBridge) the same lights worked including colour via Home app on iPhone.
I use @LexBritvin 's solution and it works fine for every first time.
If I want to change the light color again there are errors occurred.
And I can do turn on
and change color
at the same time using Siri.
The HA logs:
2018-03-28 21:36:05 ERROR (SyncWorker_6) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_default at 0x73d50c48>: Bulb closed the connection.
2018-03-28 21:36:16 ERROR (SyncWorker_16) [homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_rgb at 0x73d50b28>: Bulb closed the connection.
2018-03-28 21:38:13 ERROR (SyncWorker_2) [homeassistant.components.light.yeelight] Unable to turn the bulb on: {'code': -5000, 'message': 'general error'}
2018-03-28 21:39:45 ERROR (SyncWorker_16) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
When trying to change the color on my Yeelight bulbs through Siri / Home app, the color stays the same, even though the event is reported as successful.
Seems like the bulbs get toggled off and back on with the exact same values.
Changing brightness works. So does changing colors directly through HASS.
Homebridge Log:
Home Assistant Log: