Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while setting up platform yeelight #14088

Closed
corneels opened this issue Apr 26, 2018 · 1 comment · Fixed by #14110
Closed

Error while setting up platform yeelight #14088

corneels opened this issue Apr 26, 2018 · 1 comment · Fixed by #14110
Assignees

Comments

@corneels
Copy link

corneels commented Apr 26, 2018

Home Assistant release with the issue:

0.67.1

Last working Home Assistant release (if known):
Unsure of exact version, but I last updated about three weeks ago.

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io

Component/platform:

https://www.home-assistant.io/components/light.yeelight/

Description of problem:
Yeelight fails to set up during restarting process.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

light:
  - platform: yeelight
    devices:
      10.0.0.63:
        transition: 500
        use_music_mode: true
        save_on_change: false
      10.0.0.61:
        transition: 500
        use_music_mode: true
        save_on_change: false
      10.0.0.38:
        transition: 500
        use_music_mode: true
        save_on_change: false

Traceback (if applicable):

2018-04-26 14:47:03 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform yeelight
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 82, in async_setup
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/light/yeelight.py", line 135, in setup_platform
    name = device_config[CONF_NAME]
KeyError: 'name'

Additional information:
I had this issue previously, I cannot recall exactly what caused the lightbulbs to reappear but I believe after a long period of time they were suddenly discovered by Home Assistant.

I have assigned static IP addresses in my router, I have also verified that the lightbulbs work via the Yeelight app and also appear in my router's connected devices list at the correct addresses. I have also factory reset my router in case it is a router issue. I have also changed routers in case it is a router issue.

This is on a fresh install of Hass.io due to other issues that I have been encountering related to Home Assistant Cloud.

Yeelight was working fine previously, though it did sometimes appear in the logs due to slow set up. The bulbs would always eventually appear, though.

@corneels
Copy link
Author

corneels commented Apr 26, 2018

Okay, after much ado I've figured out that if I specify a name for the yeelight bulb in configuration.yaml as below, it works:

light:
 - platform: yeelight
   devices:
     10.0.0.63:
       name: mybulb
       transition: 500
       use_music_mode: true
       save_on_change: false

I figured out what was going on by looking at the traceback and the file in question.

I believe the issue is that the documentation states that a name for the bulb is optional. However for some reason, it doesn't seem to auto-assign names if no name is provided?

Cheers.

@syssi syssi self-assigned this Apr 27, 2018
syssi added a commit to syssi/home-assistant that referenced this issue Apr 27, 2018
@balloob balloob mentioned this issue May 11, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants