Check import
This commit is contained in:
1 parent
1e0e48fcd7
commit
c19120e012
1 file changed
+7
-1
@@ -21,7 +21,13 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
""" Sets up the Radio Thermostat. """
|
""" Sets up the Radio Thermostat. """
|
||||||
import radiotherm
|
try:
|
||||||
|
import radiotherm
|
||||||
|
except ImportError:
|
||||||
|
_LOGGER.exception(
|
||||||
|
"Unable to import radiotherm. "
|
||||||
|
"Did you maybe not install the 'radiotherm' package?")
|
||||||
|
return False
|
||||||
|
|
||||||
hosts = []
|
hosts = []
|
||||||
if CONF_HOST in config:
|
if CONF_HOST in config:
|
||||||
|
|||||||
Reference in new issue
Block a user