Yeelight component

Hi all,

I have a problem with ** YLXD01YL ** Yeelight Smart LED ceiling light, before the clean installation of hassbian v1.40 worked light without problem. After a clean installation of the hassbian v1.40 component of the yeelight light does not work and prints this error in the log.

Log Details (ERROR)

Error while setting up platform yeelight
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.5/asyncio/tasks.py”, line 400, in wait_for
return fut.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/yeelight.py”, line 125, in setup_platform
from yeelight.enums import PowerMode
ImportError: cannot import name ‘PowerMode’

I use Homeassistant version 0.78.3.
My configuration component light in configuration.yaml

light:
  - platform: yeelight
    devices:
      192.168.0.48:
        name: Living room
#        use_music_mode: True #(defaults to False)
#        save_on_change: True #(defaults to True)
        transition: 1000

Thank you for your answer.

The same issue at 0.82.1
Does anybody found answer?

Hi @artxxx,

try this

shutdown homeassistant first
su - homeassistant
source /srv/homeassistant/bin/activate
pip3 install -U yeelight
and may be
pip3 install -U homeassistant
start homeassistant again