mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Check import
This commit is contained in:
parent
1e0e48fcd7
commit
c19120e012
@ -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. """
|
||||||
|
try:
|
||||||
import radiotherm
|
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user