Check import
This commit is contained in:
parent
1e0e48fcd7
commit
c19120e012
1 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,13 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
""" 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 = []
|
||||
if CONF_HOST in config:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue