From 63c5ebf428b9bdedb6c8211acb2bc209c36487b1 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 25 Apr 2015 06:07:07 -0700 Subject: [PATCH] Fix #102 - Installing PyISY no longer required to load any light --- homeassistant/components/isy994.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/isy994.py b/homeassistant/components/isy994.py index f6ecebb9b2c..24b45e6f058 100644 --- a/homeassistant/components/isy994.py +++ b/homeassistant/components/isy994.py @@ -6,9 +6,6 @@ devices. Also contains the base classes for ISY Sensors, Lights, and Switches. import logging from urllib.parse import urlparse -# addon library imports -import PyISY - # homeassistant imports from homeassistant import bootstrap from homeassistant.loader import get_component @@ -37,6 +34,13 @@ def setup(hass, config): Setup isy994 component. This will automatically import associated lights, switches, and sensors. """ + try: + import PyISY + except ImportError: + _LOGGER.error("Error while importing dependency PyISY.") + + return False + # pylint: disable=global-statement # check for required values in configuration file if not validate_config(config,