Yeelight still not being integrated - LAN control enabled and manual YAML added

I’m new to HA and I’ve run into a really annoying issue. Yeelight is not being added, even though I’ve done everything on the blog posts and forums.

My yeelights weren’t automatically discovered. All good, so I added the following to my YAML.

discovery:
  ignore:
    - yeelight


yeelight:
  devices:
    192.168.1.179:
      name: Floor Lamp

Check config comes up with the following error:
Component error: yeelight - Requirements for yeelight not found: [‘yeelight==0.5.0’].

I even used the old yeelight yaml:

light:
  - platform: yeelight
    devices:
      192.168.1.179:
        name: Floor Lamp

and this error is:
Platform error light.yeelight - Requirements for yeelight not found: [‘yeelight==0.5.0’].

The IP address has been statically assigned. Any idea what’s going on here?

I’m running hass version 0.98.5 on Ubuntu 18.04.3.

What was your install method?

I followed this guide

sudo -u homeassistant -H -s
source /srv/homeassistant/bin/activate
pip3 install yeelight==0.5.0
deactivate
exit
sudo systemctl restart home-assistant@homeassistant

Post any errors.

SUCCESS!!!
Screenshot%20from%202019-11-04%2010-54-01

Thanks so much!!

1 Like

No worries :slightly_smiling_face:

@anon43302295 I’ve migrated to hass.io with docker and I’m experiencing the same problem, any idea if this is related? Followed these install steps.

Is it the exact same error?

@anon43302295 No, getting some weird stuff in the logs that relate only to my floor lamp

2019-12-06 07:30:41 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140647833464784] 'light.floorlamp'
Traceback (most recent call last):
 File "/usr/src/homeassistant/homeassistant/core.py", line 1244, in _safe_execute
    await self._execute_service(handler, service_call)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 265, in async_handle_core_service
    errors = await conf_util.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/config.py", line 802, in async_check_ha_config_file
    res = await check_config.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 140, in async_check_ha_config_file
    p_validated = component_platform_schema(p_config)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 205, in _run
    return self._exec(self._compiled, value, path)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 285, in _exec
    v = func(path, v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/src/homeassistant/homeassistant/components/scene/__init__.py", line 45, in _platform_validator
    return platform.PLATFORM_SCHEMA(config)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 386, in validate_mapping
    cval = cvalue(key_path, value)
 File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 205, in _run
    return self._exec(self._compiled, value, path)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 285, in _exec
    v = func(path, v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 635, in validate_sequence
    cval = validate(index_path, value)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 386, in validate_mapping
    cval = cvalue(key_path, value)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 205, in _run
    return self._exec(self._compiled, value, path)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 285, in _exec
    v = func(path, v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/src/homeassistant/homeassistant/components/homeassistant/scene.py", line 38, in _convert_states
    if isinstance(states[entity_id], dict):
KeyError: 'light.floorlamp'

P.S. I had to dive into logs because the Check Config button just hangs

Check your scenes, error refers to scene’s init

I think that’s because my scenes are referring to my Floor Lamp, and that’s not being found because yeelight isn’t yet integrated with this instance of hassio
scenes.yaml:

- name: relax
  entities:
    light.FloorLamp:
      state: on
      kelvin: 200
      brightness: 300
    light.lounge_light:
      state: on
      brightness: 5
      kelvin: 200
    switch.salt_lamp:
      state: on
    
- name: focus
  entities:
    light.FloorLamp:
      state: on
      kelvin: 6700
      brightness: 255
    light.lounge_light:
      state: on
      brightness: 255
      kelvin: 6700
    switch.salt_lamp:
      state: on
  #   light.kitchen_light:
      # state: on
- name: regular
  entities:
    light.FloorLamp:
      state: on
      kelvin: 3400
      brightness_pct: 80
    light.lounge_light:
      state: on
      brightness_pct: 80
      kelvin: 3400
    switch.salt_lamp:
      state: on    

Change floorlamp to lowercase in all places

1 Like

Wow! Now everything works! Even my Robovac that wasn’t being detected.

You’re a legend!

1 Like

Glad you’re sorted :+1:

1 Like