Wemo Dimmer Help

I didn’t realize I could do that (had to search custom_components – not well documented). Thanks!

@angel12 I’ve grabbed your wemo.py files and I’m loading them in Hass.io via the custom_components approach. It looks like it’s grabbing the right dependencies but I’m getting this in the log file. Any ideas? Otherwise I’ll chalk it up to a Hass.io thing and patiently wait for the merge. :persevere:

2017-12-11 16:35:13 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform wemo
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/light/wemo.py", line 43, in setup_platform
    if device.model_name == 'Dimmer':
AttributeError: 'NoneType' object has no attribute 'model_name'

Huzzah! It’s working regardless, so never mind. Great work @angel12!

Previously my HA instance wouldn’t fully restart, so I cleared everything out of custom_components and deps, restarted clean, then re-added the custom_components items. Restarted, saw this error in the log, but restarted HA again and now my office lights appear. ¯\_(ツ)_/¯

Ok I am lost here after reading this thread, being a noob I have the latest HA installed on Ubuntu / as docker instance and I do not see a components or custom_components directory…is the file structure that different in hassio in docker?

You have to create the custom_components folder in your config directory.

Any update on when we will see this integrated into HA? Its kind of a pain to have to manually modify the hass.io filesystem every time I reboot.

3 Likes

My pull request was merged today, 01/15/17, so hopefully will be included in the next version

So been using this for a few months and have noted a strange issue with Wemo Dimmers: The lights become unresponsive occasionally. Digging deeper, it appears to me this is because the dimmers themselves change the port they are listening on. Restarting home assistant (ie reloading the wemo component / rediscovering devices) fixes the issue but its annoying when it happens.

This does not seem to affect regular Wemo switches. Any thoughts on the best approach to fix this?

I have personally not seen that happen, and don’t believe that it can without the dimmers either rebooting or losing their connection to the wifi network.