From 8f2ca856c7bec90b55f788dc97ea09bd1c621259 Mon Sep 17 00:00:00 2001 From: sander Date: Sat, 2 Jan 2016 11:56:07 +0100 Subject: [PATCH] added return False --- homeassistant/components/thermostat/honeywell.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/thermostat/honeywell.py b/homeassistant/components/thermostat/honeywell.py index 15162a4d279..de6d5ff6a56 100644 --- a/homeassistant/components/thermostat/honeywell.py +++ b/homeassistant/components/thermostat/honeywell.py @@ -18,6 +18,7 @@ _LOGGER = logging.getLogger(__name__) CONF_AWAY_TEMP = "away_temperature" + # pylint: disable=unused-argument def setup_platform(hass, config, add_devices, discovery_info=None): """ Sets up the honeywel thermostat. """ @@ -26,10 +27,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None): username = config.get(CONF_USERNAME) password = config.get(CONF_PASSWORD) try: - away_temp = float(config.get(CONF_AWAY_TEMP,16)) + away_temp = float(config.get(CONF_AWAY_TEMP, 16)) except ValueError: _LOGGER.error("value entered for item {} should convert to a number" .format(CONF_AWAY_TEMP)) + return False if username is None or password is None: _LOGGER.error("Missing required configuration items %s or %s", CONF_USERNAME, CONF_PASSWORD) @@ -40,7 +42,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): try: zones = evo_api.temperatures(force_refresh=True) for i, zone in enumerate(zones): - add_devices([RoundThermostat(evo_api, zone['id'], i == 0,away_temp)]) + add_devices([RoundThermostat(evo_api, zone['id'], i == 0, away_temp)]) except socket.error: _LOGGER.error( "Connection error logging into the honeywell evohome web service"