yeelight light platform allows you to control your Yeelight Wifi bulbs with Home Assistant.
To enable those lights, add the following lines to your
# Example configuration.yaml entry light: - platform: yeelight devices: 192.168.1.25: name: Living Room
(map)(Required)List of Yeelight devices.
(map)(Required)IP address of the bulb.
(string)(Optional)A friendly name for the device.
(integer)(Optional)Smooth transitions over time (in ms).
Default value: 350
(boolean)(Optional)Enable music mode.
Default value: false
(boolean)(Optional)Saves the bulb state in its nonvolatile memory when changed from Home Assistant.
Default value: false
(string)(Optional)Yeelight model. Possible values are
ceiling4. The setting is used to enable model specific features f.e. a particular color temperature range.
Per default the bulb limits the amount of requests per minute to 60, a limitation which can be bypassed by enabling the music mode. In music mode the bulb is commanded to connect back to a socket provided by the component and it tries to keep the connection open, which may not be wanted in all use-cases. Also note that bulbs in music mode will not update their state to “unavailable” if they are disconnected, which can cause delays in Home Assistant. Bulbs in music mode may also not react to commands from HASS the first time if the connection is dropped. If you experience this issue, turn the light off and back on again in the frontend and everything will return to normal.
Before trying to control your light through Home Assistant, you have to setup your bulb using Yeelight app. ( Android, IOS ). In the bulb property, you have to enable “LAN Mode” (previously called “Developer mode”). LAN mode may only be available with the latest firmware installed on your bulb. Firmware can be updated in the application after connecting the bulb. Determine your bulb IP (using router, software, ping…). Information on how to enable “LAN Mode” can be found here.
This component is tested to work with the following models. If you have a different model and it is working please let us know.
|Model ID||Model number||Product name|
||YLDP01YL||LED Bulb (White)|
|?||YLDP05YL||LED Bulb (White) - 2nd generation|
||YLDP02YL||LED Bulb (Color)|
||YLDP03YL||LED Bulb (Color) - E26|
||YLDP06YL||LED Bulb (Color) - 2nd generation|
||MJCTD01YL||Xiaomi Mijia Bedside Lamp - WIFI Version!|
||MJTD01YL||Xiaomi Mijia Smart LED Desk Lamp (autodiscovery isn’t possible because the device doesn’t support mDNS due to the small amount of RAM)|
||YLXD01YL||Yeelight Ceiling Light|
||YLXD03YL||Yeelight Ceiling Light - Youth Version|
|?, may be
||YLXD04YL||Yeelight Ceiling Light (Jiaoyue 450)|
||YLXD05YL||Yeelight Ceiling Light (Jiaoyue 480)|
||YLXD02YL||Yeelight Ceiling Light (Jiaoyue 650)|
Set an operation mode.
|Service data attribute||Optional||Description|
||yes||Only act on a specific yeelight. Else targets all.|
||no||Operation mode. Valid values are ‘last’, ‘normal’, ‘rgb’, ‘hsv’, ‘color_flow’, ‘moonlight’.|
In this section you find some real-life examples of how to use this light.
This example shows how you can use the optional configuration options.
# Example configuration.yaml entry light: - platform: yeelight devices: 192.168.1.25: name: Living Room transition: 1000 use_music_mode: True save_on_change: True
This example shows how you can add multiple bulbs in your configuration.
light: - platform: yeelight devices: 192.168.1.25: name: Living Room 192.168.1.13: name: Front Door