Xiaomi Yeelight Strip not supported in HA 50.1

I got this Strip for quite a while and never make it work since HA 49.1. I found that the components info page got updated today, which saying the model number for strip is YLDD02YL, but mine is YLDD01YL.

I’ve read all topic in forum about Yeelight and strip including this one specifically. My situation is different from this, HA just refuse to add my strip. With yeelight platform setup, my error log and configuration is attached behind.

I am pretty sure about the validity of setup code in configuration.yaml. Also, I try music_mode on and off, both had no effect on the device recognition.

At this stage, I think I run out of methods and resources to help myself. So anyone can help me on this? Thanks a lot~

1 Like

Hey, can you put your error log output in a code formatted block? Just highlight the text and click the “</>” button in the post editor.

What does your configuration.yaml file entry look like for this light? Can you post that here?

2017-07-31 14:16:49 WARNING (Thread-7) [root] Unknown miio device found: ServiceInfo(type=’_miio._udp.local.’, name=‘yeelink-light-strip1_miio54692213._miio._udp.local.’, address=b’\xc0\xa82\xd5’, port=54321, weight=0, priority=0, server=‘yeelink-light-strip1_miio54692213.local.’, properties={b’mac’: b’286c072f6ce6’, b’epoch’: b’1’})
2017-07-31 14:16:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 233, in _step
result = coro.throw(exc)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 381, in async_process_entity
new_entity, self, update_before_add=update_before_add
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 212, in async_add_entity
yield from self.hass.async_add_job(entity.update)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(self.args, **self.kwargs)
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/yeelight.py”, line 258, in update
self._rgb = self._get_rgb_from_properties()
File “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/light/yeelight.py”, line 198, in _get_rgb_from_properties
return colorsys.hsv_to_rgb(hue, sat, val)
File “/usr/lib/python3.4/colorsys.py”, line 146, in hsv_to_rgb
i = int(h6.0) # XXX assume int() truncates!
TypeError: can’t multiply sequence by non-int of type ‘float’
#yeelight
light:
  - platform: yeelight
    devices:
      192.168.50.213:
        name: yeelight
        transition: 1000
        use_music_mode: True
        save_on_change: False

Here’s my configuration. Note that the firmware is the latest version and I already turn on the developer mode. Also I have tried setting use_music_mode to True and False. Both lead to the same result.

It looks to me like the problem is here:

File “/usr/lib/python3.4/colorsys.py”, line 146, in hsv_to_rgb
i = int(h6.0) # XXX assume int() truncates!
TypeError: can’t multiply sequence by non-int of type ‘float’

And here:

    transition: 1000

I’m guessing that for whatever reason the transition variable needs to be less than 4 digits. Try setting it to 999.

I set it to 999, 900, 500… And unluckily it didn’t work.:tired_face:

Was the log output the same after you did that?

Yes, exactly the same.

Have you tried removing the music mode and save on change keys from your yaml file?

Here’s another thread on the topic, by the way: Xiaomi Yeelight LED strip

I can confirm my config is working on 0.50.2 … but it is a YLDD02YL, I am not sure the difference between the two light strips and what might have changed in the updates.

Thanks. I have tried remove the music mode and save on change part from yaml flie, but no, it just refused to work.
And I have also read the other thread, but my situation is different from hers. At least she can turn on/off the light, but mine did not even show up at the frontend.

Yeah, at this stage, I have only to think the difference between two models. I have asked Yeelight staffs at the forum, just wait for reply.

1 Like

I’ll be interested to hear what they say. I just bought the ‘2’ model off of Amazon, I’ll see if I have any trouble with that when I receive it.

UPDATE - just hard reset my Pi3 and now they no longer work. Here’s my error:

2017-08-03 07:18:46 ERROR (SyncWorker_6) [homeassistant.components.light.yeelight] Failed to connect to bulb 10.10.10.22, office_light_strip: A socket error occurred when sending the command.

They worked fine just prior to the reset.

I updated to 0.50.2 from 0.50.1, and my lightstrips are still working normally, even after a reboot of the Pi3. I added use_music_mode: true to my config and it works even better (prior to that, using Effects would cause connectivity failure).

My lightstrips are model YLDD02YL.

Well this is interesting. So I decided to try and ping my light from the hass.io box. nope… can’t reach it. Then pinged it from my local computer. Yep… works fine. Tried pinging my smartthings hub from hass.io… yep… works fine. Hass.io can’t reach the lights. What the heck? same network… but can’t ping them.

For clarification, I’m using hass in a Python virtualenv. I am not using hass.io. I’m not saying that’s your issue, but it is one difference.

1 Like

I forgot to mention it. I am using HASS in python virtual environment as well, since it is installed by ALL-in-one method.