forked from home-assistant/core
Port PyNetgear from external to requirements.txt
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,6 +1,3 @@
|
|||||||
[submodule "homeassistant/external/pynetgear"]
|
|
||||||
path = homeassistant/external/pynetgear
|
|
||||||
url = https://github.com/balloob/pynetgear.git
|
|
||||||
[submodule "homeassistant/external/pywemo"]
|
[submodule "homeassistant/external/pywemo"]
|
||||||
path = homeassistant/external/pywemo
|
path = homeassistant/external/pywemo
|
||||||
url = https://github.com/balloob/pywemo.git
|
url = https://github.com/balloob/pywemo.git
|
||||||
|
@@ -43,6 +43,7 @@ from homeassistant.components.device_tracker import DOMAIN
|
|||||||
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=5)
|
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=5)
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
REQUIREMENTS = ['pynetgear>=0.1']
|
||||||
|
|
||||||
|
|
||||||
def get_scanner(hass, config):
|
def get_scanner(hass, config):
|
||||||
@@ -64,22 +65,10 @@ class NetgearDeviceScanner(object):
|
|||||||
""" This class queries a Netgear wireless router using the SOAP-API. """
|
""" This class queries a Netgear wireless router using the SOAP-API. """
|
||||||
|
|
||||||
def __init__(self, host, username, password):
|
def __init__(self, host, username, password):
|
||||||
|
import pynetgear
|
||||||
|
|
||||||
self.last_results = []
|
self.last_results = []
|
||||||
|
|
||||||
try:
|
|
||||||
# Pylint does not play nice if not every folders has an __init__.py
|
|
||||||
# pylint: disable=no-name-in-module, import-error
|
|
||||||
import homeassistant.external.pynetgear.pynetgear as pynetgear
|
|
||||||
except ImportError:
|
|
||||||
_LOGGER.exception(
|
|
||||||
("Failed to import pynetgear. "
|
|
||||||
"Did you maybe not run `git submodule init` "
|
|
||||||
"and `git submodule update`?"))
|
|
||||||
|
|
||||||
self.success_init = False
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
self._api = pynetgear.Netgear(host, username, password)
|
self._api = pynetgear.Netgear(host, username, password)
|
||||||
self.lock = threading.Lock()
|
self.lock = threading.Lock()
|
||||||
|
|
||||||
|
1
homeassistant/external/pynetgear
vendored
1
homeassistant/external/pynetgear
vendored
Submodule homeassistant/external/pynetgear deleted from e946ecf792
@@ -79,3 +79,6 @@ PyMata==2.07a
|
|||||||
|
|
||||||
# Mysensors
|
# Mysensors
|
||||||
https://github.com/theolind/pymysensors/archive/master.zip#egg=pymysensors-0.1
|
https://github.com/theolind/pymysensors/archive/master.zip#egg=pymysensors-0.1
|
||||||
|
|
||||||
|
# Netgear (device_tracker.netgear)
|
||||||
|
pynetgear>=0.1
|
||||||
|
Reference in New Issue
Block a user