Yeelight led ceiling light compatible with HA

Correct. The release cycle of HA is two weeks. The merge window of 0.65 is closed already. As far as this line doesn’t show “1.2.4” anymore the issue will be fixed at the next release of HA:

Good news! netdisco 1.3.0 was released a few minutes ago and will be integrated into home assistant soon:

https://github.com/home-assistant/home-assistant/pull/13007

seems already supported. https://github.com/skorokithakis/python-yeelight/commit/de91518ea98dfaa5c7fe1dbfbe43304365044e43

I’ve implemented a set_mode service to control the power mode of the light:

light.yeelight_set_mode {"mode": 5, "entity_id": "light.ceiling"}

Unfortunately the mentioned feature (thanks to @tsw) isn’t part of a official release yet. The feature isn’t available at v0.3.3. If you are able to install the master branch of the underlying library you could test my custom component.

As far as the feature works fine I will prepare a PR to integrate the feature into HA.

I’ve fixed another issue here:

https://github.com/skorokithakis/python-yeelight/pull/5

I hope it will be merged and released soon. So the colorweel will disappear again for devices without RGB support.

1 Like

hi, syssi, maybe you can do a little more, move RGB support to its Ambilight feature(JIAOYUE 650 has a background LED supports color), ref here: http://forum.yeelight.com/t/yeelight-ceiling-650-api-json/4281/6 :slight_smile:

1 Like

The underlying library (yeelight) was released (v0.4.0) a few minutes ago. I’m happy if someone could test the custom component / the moonlight mode. The different modes are:

0: Last
1: Normal
2: RGB
3: HSV
4: Color flow
5: Moonlight

just simply replace with the official components/light/yeelight.py and changed /components/discovery.py to 1.3.0, but the moonlight mode not shown up, anything wrong?

I’ve implemented a service. The UI of the light won’t change. A custom component overrides the original one. No need to overwrite.

This page explains how to use custom components: https://home-assistant.io/developers/creating_components/

The location and hierarchie of the directory is just important. The service can be control by the development tools (remote ccontrol symbol) at the bottom left.

thanks for the explanation. I placed the yeelight.py to custom_components/light/, config leaves the same, but no change, anything I missed?

This is totally fine. Now goto http://your-homeassistant/dev-service. There should be a new service available at the dropdown. It’s called light.yeelight_set_mode. Select the service and use the json payload from above. Try to set “mode: 5” for the correct entity.

Payload: {"mode": 5, "entity_id": "light.ceiling"}

This service call can be used for automations. I don’t know the effect of the other modes. May be some of the modes shouldn’t be used.

Hi syssi,

thanks for your effort. I had not much time but it works, did a quick test this morning and was able to access moon mode.
I also made a small automation and moon mode popped up.

Log errors were still present but I stumbled upon this thread by luck this morning (did not receive notifications) and had no time to read everything.
I will have a closer look to it this evening!

Cheers, hagd

Edit:

Ok, read the whole thread now and did some testing. Editing the yeelight.py was no success - auto discovery did not work - ceiling light wasnt available.

The moon mode works 100% - I added it to some automations, using it as night light light at 1% brightness, and will report back. Adjusting the brightness requires an additional action but it works.

If you need me to do further testing, I have an eye on this thread and will do what I can asap.

1 Like

@DonTomato Cool! Thanks for testing. Are there more unsupported features of the ceiling light currently?

I will update the turn_on service. So moonlight mode and brightness can be updated in one shot.

Hey syssi, ceiling light can be used as BLE gateway with Mi home app (since few versions back) , any idea if this can be integrated in HA ? thanks!

What’s the BLE gateway used for?

can discover Bluetooth low energy devices … like mi flora plant sensor for example

It can read all the values from the bluetooth devices like @nkolev2 said, basically acting as a gateway. It would be really neat if we could somehow read these (like the mentioned flora plant sensor which is already supported as a component for HA, so it shouldn’t be too hard, right?).

@syssi I also noticed that netdisco 1.3 is out and that’s awesome (and thank you for your effort), but when you say it will be released in the next HA, you mean 0.66 not incremental updates like 0.65.4? Correct? Cause the errors are still there :slight_smile:

I meant the 0.66 release.

1 Like