molobrakos / tellduslive

Communicate with Telldus Live servers
The Unlicense
10 stars 9 forks source link

Remove unused import #7

Closed rasmusbe closed 6 years ago

rasmusbe commented 6 years ago

The discovery file isn't used at all from what I can see and isn't included in the setup

Got an error about this when trying to load the new Home Assistant tellduslive component

2017-11-16 21:30:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component tellduslive
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 194, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.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/tellduslive.py", line 59, in setup
    from tellduslive import Session, supports_local_api
  File "/config/deps/lib/python3.6/site-packages/tellduslive.py", line 10, in <module>
    from discovery import discover
ModuleNotFoundError: No module named 'discovery'
molobrakos commented 6 years ago

Sorry about that, no idea why I didn't get that error when testing locally. I just moved the import for now, it was supposed to be used for the very basic command line tool here: https://github.com/molobrakos/tellduslive/blob/master/tellduslive , mainly used to illustrate how to turn on/off switches etc.

rasmusbe commented 6 years ago

Oh I see, it works now when I installed from the repo but I think you need to bump the version so that home-assistant/home-assistant#10435 can use it

molobrakos commented 6 years ago

Good to know that it works, I'll fix the version, thanks for helping out!