forked from home-assistant/core
Port PyWemo from external to requirements.txt
This commit is contained in:
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
Submodule homeassistant/external/pywemo deleted from ca94e41faa
@@ -82,3 +82,6 @@ pynetgear>=0.1
|
|||||||
|
|
||||||
# Netdisco (discovery)
|
# Netdisco (discovery)
|
||||||
netdisco>=0.1
|
netdisco>=0.1
|
||||||
|
|
||||||
|
# Wemo (switch.wemo)
|
||||||
|
pywemo>=0.1
|
||||||
|
Reference in New Issue
Block a user