mirror of
https://github.com/home-assistant/core.git
synced 2025-04-22 16:27:56 +00:00
Port PyWemo from external to requirements.txt
This commit is contained in:
parent
3efb1e4ac9
commit
2f622053a6
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"]
|
||||
path = homeassistant/external/noop
|
||||
url = https://github.com/balloob/noop.git
|
||||
|
@ -12,17 +12,8 @@ from homeassistant.components.switch import SwitchDevice
|
||||
# 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)
|
||||
|
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>=0.1
|
||||
|
||||
# Wemo (switch.wemo)
|
||||
pywemo>=0.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user