core: Yeelight no longer supports colour or temperature

The problem

As of 0.111.0 the Yeelight integration no longer offers colour or colour temperature controls.

Environment

  • Home Assistant Core release with the issue: 0.111.0
  • Last working Home Assistant Core release (if known): 0.110.4
  • Operating environment (Home Assistant/Supervised/Docker/venv): venv
  • Integration causing this issue: Yeelight
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/yeelight

Problem-relevant configuration.yaml

Purely UI integration


Traceback/Error logs

No errors


Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 28 (17 by maintainers)

Most upvoted comments

In my case, I had to add model: strip1 to each Strip declaration in yeelight.yaml and everything come back.

Same problem here. I have an MJTD01YL light (Xiaomi Led Desk Lamp). It is not autodiscovered, and with 0.111.4 no temperature control anymore.

Yes either set model / downgrade or download https://github.com/zewelor/home-assistant/tree/34f855b978ab50021fbfb899b7f1879116f89c73/homeassistant/components/yeelight and use it as custom_component ( Which would be great help to find some issues, if there is some edge case ). But later remember to delete after upgrade to 0.112

With changes from https://github.com/home-assistant/core/pull/36658 adding missing bulb type in yeelight-lib also shouldn’t be needed. Its only used to use correct temp range, and most of devices have same range.

Ok, I was able to fix this with two changes, ~but I’m not sure if it’s sufficient~

  1. In yeelight (currently version 0.5.2), I changed:
--- main.py.ref 2020-06-14 12:43:59.000000000 +0300
+++ main.py     2020-06-14 12:41:17.000000000 +0300
@@ -40,6 +40,7 @@
     "ceiling4": {"color_temp": {"min": 2700, "max": 6500}, "night_light": True, "background_light": True},
     "color2": {"color_temp": {"min": 2700, "max": 6500}, "night_light": False, "background_light": False},
     "ceiling13": {"color_temp": {"min": 2700, "max": 6500}, "night_light": True, "background_light": False},
+    "ct_bulb": {"color_temp": {"min": 2700, "max": 6500}, "night_light": False, "background_light": False},
 }


  1. And then in HA, I added:
--- components/yeelight/light.py.ref        2020-06-14 12:49:36.000000000 +0300
+++ components/yeelight/light.py    2020-06-14 12:49:21.000000000 +0300
@@ -138,6 +138,7 @@
     "bslamp2": BulbType.Color,
     "RGBW": BulbType.Color,
     "lamp1": BulbType.WhiteTemp,
+    "ct_bulb": BulbType.WhiteTemp,
     "ceiling1": BulbType.WhiteTemp,
     "ceiling2": BulbType.WhiteTemp,
     "ceiling3": BulbType.WhiteTemp,

~However, given that https://github.com/home-assistant/core/pull/36658 removes support for the mapping in HA, and without it, even with the change to the yeelight library, I didn’t have color temperature available, I think there’s probably still something else missing.~

~@rytilahti, @zewelor any ideas?~ I was wrong; once we have the change in the yeelight module, the device.type used by #36658 has the proper value

In any case, I’ve opened https://gitlab.com/stavros/python-yeelight/-/merge_requests/40 for adding ct_bulb to the upstream module, which has been merged. I’ll open a PR on home-assistant core once this is released.