Remove uncessary requirement check

HA already check the requirement before setup the platform
This commit is contained in:
hydreliox 2016-01-13 03:29:17 +01:00
parent bcb42674fc
commit f182f7dccd

View File

@ -37,16 +37,6 @@ MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=600)
def setup_platform(hass, config, add_devices, discovery_info=None): def setup_platform(hass, config, add_devices, discovery_info=None):
""" Get the NetAtmo sensor. """ """ Get the NetAtmo sensor. """
try:
import lnetatmo
except ImportError:
_LOGGER.exception(
"Unable to import lnetatmo. "
"Did you maybe not install the package ?")
return False
SENSOR_TYPES['temperature'][1] = hass.config.temperature_unit SENSOR_TYPES['temperature'][1] = hass.config.temperature_unit
unit = hass.config.temperature_unit unit = hass.config.temperature_unit
authorization = lnetatmo.ClientAuth(config.get(CONF_API_KEY, None), authorization = lnetatmo.ClientAuth(config.get(CONF_API_KEY, None),