Yeelight led ceiling light compatible with HA


This lamp - is still unknown.


Could you post the error messsage? The light is called “ceiling4”, right? Are you able to control the light and should we add it to the documentation as supported device?


Error log:
Unknown miio device found: ServiceInfo(type=’_miio._udp.local.’, name=‘yeelink-light-ceiling4_mibt72799069._miio._udp.local.’, address=b’\xc0\xa8\x01o’, port=54321, weight=0, priority=0, server=‘yeelink-light-ceiling4_mibt72799069.local.’, properties={b’epoch’: b’1’, b’mac’: b’7811dc689590’})

Yes I can half way control the lamp, only ceiling mode is working, the RGB strip isn’t recognize.


I prepared a PR to avoid the error message in future:

Could you provide the model number of the device? It looks like this: MJTD01YL


If these errors aren’t periodically it’s fine. :wink:


From official Yeelight web page it is YLXD02YL (



The following lamp is not supported at all (Ceiling light 3). Model is YLXD05YL ( |

Log: Unknown miio device found: ServiceInfo(type='_miio._udp.local.', name='yeelink-light-ceiling3_mibt77211360._miio._udp.local.', address=b'\xc0\xa8\x00\xbb', port=54321, weight=0, priority=0, server='yeelink-light-ceiling3_mibt77211358.local.', properties={b'mac': b'XXXXXXXXXXXX', b'epoch': b'1'})


Could you try to enable the yeelight developer api and control the light? Does it work? The error message will disappear in future for all types of yeelights.


Developer mode is on. I can turn the lamp on and off through HA, I can change the brightness and also I can change the color temperature but it’s broken in the same way as the ceiling light 1 (the slider works half the distance) Error when calling <function YeelightLight.set_colortemp at 0x6db22780>: {'code': -5000, 'message': 'general error'}. The miio error spams every 5 minutes.

Forgot to mention I’m using HA 0.66.1.


Please ignore the spam. The error isn’t important and removed soon. The range of the supported color temperature of the ceiling lamp is pretty small, right? (compared to a yeelight bulb)


You could try to changes these values for testing:

Your ceiling lamp support 2700 upto 6000. Restart Home Assistant and check the color temp slider. Does it work properly now?


YLXD01YL (Ceiling light 1): 2700K-6500K
YLXD05YL (Celing light 3): 2700K-6000K
Yeelight bulb: 1700K-6500K

Changing the component values does fix the problem with the slider.


Perfect! We could extend the yeelight component probably to handle the different specs per device type.


Is someone of the Yeelight Ceiling folks willing to test this new feature:

The component is able to detect the device type and provides a proper range for the color temperature.


Hey @syssi guess who got a Yeelight? :slight_smile:

There’s an exception in the log that prevents the light from being loaded:

  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/", line 311, in _async_add_entity
await entity.async_update_ha_state()
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/", line 222, in async_update_ha_state
attr = self.state_attributes or {}
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/light/", line 496, in state_attributes
data[ATTR_MIN_MIREDS] = self.min_mireds
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/light/", line 251, in min_mireds
if self._min_mireds is not None:
AttributeError: 'YeelightLight' object has no attribute '_min_mireds'


Cool! I will fix the issue and will ping you.


@mouth4war Fixed! :slight_smile:


Tested! No more of that error.

However, cannot change color temperature from HASS UI. There is an error:

[homeassistant.components.light.yeelight] Error when calling <function YeelightLight.set_colortemp at 0x564dc0c0>: {'code': -5000, 'message': 'general error'}


Could you enable the debug log and provide some details?

  default: warn
    custom_components.light.yeelight: debug
    yeelight: debug


Sure. The temperature is changing. But the slider responds only till halfway. After halfway on the slider (which seems like max warmth), there are errors in the log and the light stays at the same temp.

My model is ceiling1 (YLXD01YL).