Port PyWemo from external to requirements.txt
This commit is contained in:
parent
3efb1e4ac9
commit
2f622053a6
4 changed files with 5 additions and 15 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,6 +1,3 @@
|
||||||
[submodule "homeassistant/external/pywemo"]
|
|
||||||
path = homeassistant/external/pywemo
|
|
||||||
url = https://github.com/balloob/pywemo.git
|
|
||||||
[submodule "homeassistant/external/noop"]
|
[submodule "homeassistant/external/noop"]
|
||||||
path = homeassistant/external/noop
|
path = homeassistant/external/noop
|
||||||
url = https://github.com/balloob/noop.git
|
url = https://github.com/balloob/noop.git
|
||||||
|
|
|
@ -12,17 +12,8 @@ from homeassistant.components.switch import SwitchDevice
|
||||||
# pylint: disable=unused-argument
|
# pylint: disable=unused-argument
|
||||||
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||||
""" Find and return WeMo switches. """
|
""" Find and return WeMo switches. """
|
||||||
try:
|
import pywemo
|
||||||
# pylint: disable=no-name-in-module, import-error
|
import pywemo.discovery as discovery
|
||||||
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
|
|
||||||
|
|
||||||
if discovery_info is not None:
|
if discovery_info is not None:
|
||||||
device = discovery.device_from_description(discovery_info)
|
device = discovery.device_from_description(discovery_info)
|
||||||
|
|
1
homeassistant/external/pywemo
vendored
1
homeassistant/external/pywemo
vendored
|
@ -1 +0,0 @@
|
||||||
Subproject commit ca94e41faa48c783f600a2efd550c6b7dae01b0d
|
|
|
@ -82,3 +82,6 @@ pynetgear>=0.1
|
||||||
|
|
||||||
# Netdisco (discovery)
|
# Netdisco (discovery)
|
||||||
netdisco>=0.1
|
netdisco>=0.1
|
||||||
|
|
||||||
|
# Wemo (switch.wemo)
|
||||||
|
pywemo>=0.1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue