Skip to content

Commit

Permalink
Port PyWemo from external to requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Jul 20, 2015
1 parent 3efb1e4 commit 2f62205
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "homeassistant/external/pywemo"]
path = homeassistant/external/pywemo
url = https://github.com/balloob/pywemo.git
[submodule "homeassistant/external/noop"]
path = homeassistant/external/noop
url = https://github.com/balloob/noop.git
Expand Down
13 changes: 2 additions & 11 deletions homeassistant/components/switch/wemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,8 @@
# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
""" Find and return WeMo switches. """
try:
# pylint: disable=no-name-in-module, import-error
import homeassistant.external.pywemo.pywemo as pywemo
import homeassistant.external.pywemo.pywemo.discovery as discovery
except ImportError:
logging.getLogger(__name__).exception((
"Failed to import pywemo. "
"Did you maybe not run `git submodule init` "
"and `git submodule update`?"))

return
import pywemo
import pywemo.discovery as discovery

if discovery_info is not None:
device = discovery.device_from_description(discovery_info)
Expand Down
1 change: 0 additions & 1 deletion homeassistant/external/pywemo
Submodule pywemo deleted from ca94e4
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ pynetgear>=0.1

# Netdisco (discovery)
netdisco>=0.1

# Wemo (switch.wemo)
pywemo>=0.1

0 comments on commit 2f62205

Please sign in to comment.