From 89bdead44c27c8e36f9b52a2dccc01a0f25cc74c Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 8 Sep 2015 20:11:25 -0700 Subject: [PATCH] Remove latest git submodules --- .gitmodules | 9 --------- homeassistant/components/light/vera.py | 7 +++++-- homeassistant/components/sensor/sabnzbd.py | 10 +++++++--- homeassistant/components/sensor/vera.py | 7 +++++-- homeassistant/components/switch/vera.py | 7 +++++-- homeassistant/external/noop | 1 - homeassistant/external/nzbclients | 1 - homeassistant/external/vera | 1 - requirements_all.txt | 8 ++++++++ 9 files changed, 30 insertions(+), 21 deletions(-) delete mode 160000 homeassistant/external/noop delete mode 160000 homeassistant/external/nzbclients delete mode 160000 homeassistant/external/vera diff --git a/.gitmodules b/.gitmodules index a627e522d8f..ad28a4e2c8a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,3 @@ -[submodule "homeassistant/external/noop"] - path = homeassistant/external/noop - url = https://github.com/balloob/noop.git -[submodule "homeassistant/external/vera"] - path = homeassistant/external/vera - url = https://github.com/jamespcole/home-assistant-vera-api.git -[submodule "homeassistant/external/nzbclients"] - path = homeassistant/external/nzbclients - url = https://github.com/jamespcole/home-assistant-nzb-clients.git [submodule "homeassistant/components/frontend/www_static/home-assistant-polymer"] path = homeassistant/components/frontend/www_static/home-assistant-polymer url = https://github.com/balloob/home-assistant-polymer.git diff --git a/homeassistant/components/light/vera.py b/homeassistant/components/light/vera.py index ab52905308b..f41bfb56685 100644 --- a/homeassistant/components/light/vera.py +++ b/homeassistant/components/light/vera.py @@ -51,8 +51,10 @@ it should be set to "true" if you want this device excluded. import logging from requests.exceptions import RequestException from homeassistant.components.switch.vera import VeraSwitch -# pylint: disable=no-name-in-module, import-error -import homeassistant.external.vera.vera as veraApi + +REQUIREMENTS = ['https://github.com/balloob/home-assistant-vera-api/archive/' + 'a8f823066ead6c7da6fb5e7abaf16fef62e63364.zip' + '#python-vera==0.1'] _LOGGER = logging.getLogger(__name__) @@ -60,6 +62,7 @@ _LOGGER = logging.getLogger(__name__) # pylint: disable=unused-argument def setup_platform(hass, config, add_devices_callback, discovery_info=None): """ Find and return Vera lights. """ + import pyvera as veraApi base_url = config.get('vera_controller_url') if not base_url: diff --git a/homeassistant/components/sensor/sabnzbd.py b/homeassistant/components/sensor/sabnzbd.py index 89110f7a71d..319ba1c8b53 100644 --- a/homeassistant/components/sensor/sabnzbd.py +++ b/homeassistant/components/sensor/sabnzbd.py @@ -47,12 +47,13 @@ from homeassistant.util import Throttle from datetime import timedelta from homeassistant.helpers.entity import Entity -# pylint: disable=no-name-in-module, import-error -from homeassistant.external.nzbclients.sabnzbd import SabnzbdApi -from homeassistant.external.nzbclients.sabnzbd import SabnzbdApiException import logging +REQUIREMENTS = ['https://github.com/jamespcole/home-assistant-nzb-clients/' + 'archive/616cad59154092599278661af17e2a9f2cf5e2a9.zip' + '#python-sabnzbd==0.1'] + SENSOR_TYPES = { 'current_status': ['Status', ''], 'speed': ['Speed', 'MB/s'], @@ -70,6 +71,8 @@ _THROTTLED_REFRESH = None # pylint: disable=unused-argument def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the SABnzbd sensors. """ + from SabnzbdApiException import SabnzbdApi, SabnzbdApiException + api_key = config.get("api_key") base_url = config.get("base_url") name = config.get("name", "SABnzbd") @@ -130,6 +133,7 @@ class SabnzbdSensor(Entity): def refresh_sabnzbd_data(self): """ Calls the throttled SABnzbd refresh method. """ if _THROTTLED_REFRESH is not None: + from SabnzbdApiException import SabnzbdApiException try: _THROTTLED_REFRESH() except SabnzbdApiException: diff --git a/homeassistant/components/sensor/vera.py b/homeassistant/components/sensor/vera.py index 47748af637e..b02e3acdea0 100644 --- a/homeassistant/components/sensor/vera.py +++ b/homeassistant/components/sensor/vera.py @@ -54,8 +54,10 @@ from homeassistant.helpers.entity import Entity from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_TRIPPED, ATTR_ARMED, ATTR_LAST_TRIP_TIME, TEMP_CELCIUS, TEMP_FAHRENHEIT) -# pylint: disable=no-name-in-module, import-error -import homeassistant.external.vera.vera as veraApi + +REQUIREMENTS = ['https://github.com/balloob/home-assistant-vera-api/archive/' + 'a8f823066ead6c7da6fb5e7abaf16fef62e63364.zip' + '#python-vera==0.1'] _LOGGER = logging.getLogger(__name__) @@ -63,6 +65,7 @@ _LOGGER = logging.getLogger(__name__) # pylint: disable=unused-argument def get_devices(hass, config): """ Find and return Vera Sensors. """ + import pyvera as veraApi base_url = config.get('vera_controller_url') if not base_url: diff --git a/homeassistant/components/switch/vera.py b/homeassistant/components/switch/vera.py index e568596a0b2..bb7f43522f4 100644 --- a/homeassistant/components/switch/vera.py +++ b/homeassistant/components/switch/vera.py @@ -52,8 +52,10 @@ import homeassistant.util.dt as dt_util from homeassistant.helpers.entity import ToggleEntity from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_TRIPPED, ATTR_ARMED, ATTR_LAST_TRIP_TIME) -# pylint: disable=no-name-in-module, import-error -import homeassistant.external.vera.vera as veraApi + +REQUIREMENTS = ['https://github.com/balloob/home-assistant-vera-api/archive/' + 'a8f823066ead6c7da6fb5e7abaf16fef62e63364.zip' + '#python-vera==0.1'] _LOGGER = logging.getLogger(__name__) @@ -61,6 +63,7 @@ _LOGGER = logging.getLogger(__name__) # pylint: disable=unused-argument def get_devices(hass, config): """ Find and return Vera switches. """ + import pyvera as veraApi base_url = config.get('vera_controller_url') if not base_url: diff --git a/homeassistant/external/noop b/homeassistant/external/noop deleted file mode 160000 index 4eaeb3367f9..00000000000 --- a/homeassistant/external/noop +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4eaeb3367f9ada05dae3319cf24ab1da5de1aa89 diff --git a/homeassistant/external/nzbclients b/homeassistant/external/nzbclients deleted file mode 160000 index f01997498fe..00000000000 --- a/homeassistant/external/nzbclients +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f01997498fe190d6ac2a2c375a739024843bd44d diff --git a/homeassistant/external/vera b/homeassistant/external/vera deleted file mode 160000 index 30c59781d63..00000000000 --- a/homeassistant/external/vera +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 30c59781d63322db2160ff00a4b99f16ead40b85 diff --git a/requirements_all.txt b/requirements_all.txt index f03b763f00f..f44b14d9ba7 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -122,3 +122,11 @@ https://github.com/persandstrom/python-verisure/archive/9873c4527f01b1ba1f72ae60 # Python tools for interacting with IFTTT Maker Channel (ifttt) pyfttt==0.3 + +# sensor.sabnzbd +https://github.com/balloob/home-assistant-nzb-clients/archive/616cad59154092599278661af17e2a9f2cf5e2a9.zip#python-sabnzbd==0.1 + +# switch.vera +# sensor.vera +# light.vera +https://github.com/balloob/home-assistant-vera-api/archive/a8f823066ead6c7da6fb5e7abaf16fef62e63364.zip#python-vera==0.1