From 776c7dae07da51684d5791a25500db9e7fb8b87d Mon Sep 17 00:00:00 2001 From: Jeff Schroeder Date: Wed, 19 Aug 2015 22:19:41 -0500 Subject: [PATCH 1/5] Fix a tyop in the arduino switch component --- homeassistant/components/switch/arduino.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/switch/arduino.py b/homeassistant/components/switch/arduino.py index bb962c08f72..b38cc290b23 100644 --- a/homeassistant/components/switch/arduino.py +++ b/homeassistant/components/switch/arduino.py @@ -1,7 +1,7 @@ """ homeassistant.components.switch.arduino ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Support for switching Arduino pins on and off. So fare only digital pins are +Support for switching Arduino pins on and off. So far only digital pins are supported. Configuration: From f5b5d3f65ab3377bab3c0273367d8ab2fa5dfdaa Mon Sep 17 00:00:00 2001 From: Jeff Schroeder Date: Wed, 19 Aug 2015 22:17:56 -0500 Subject: [PATCH 2/5] Use str.split maxsplit in the time component --- homeassistant/components/scheduler/time.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/scheduler/time.py b/homeassistant/components/scheduler/time.py index 9fec19fbe57..4d0280dfdf9 100644 --- a/homeassistant/components/scheduler/time.py +++ b/homeassistant/components/scheduler/time.py @@ -28,7 +28,7 @@ def create_event_listener(schedule, event_listener_data): service = event_listener_data['service'] (hour, minute, second) = [int(x) for x in - event_listener_data['time'].split(':')] + event_listener_data['time'].split(':', 3)] return TimeEventListener(schedule, service, hour, minute, second) From 473047f3dd724c13fd8a6acbea3ace9aec31ed49 Mon Sep 17 00:00:00 2001 From: Jeff Schroeder Date: Wed, 19 Aug 2015 22:11:10 -0500 Subject: [PATCH 3/5] Fix a small tyop in the history component --- homeassistant/components/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/history.py b/homeassistant/components/history.py index 1d2ccc9ab14..01f75eabb5a 100644 --- a/homeassistant/components/history.py +++ b/homeassistant/components/history.py @@ -147,7 +147,7 @@ def _api_history_period(handler, path_match, data): end_time = start_time + one_day - print("Fetchign", start_time, end_time) + print("Fetching", start_time, end_time) entity_id = data.get('filter_entity_id') From 3dc1dc6c6a971e6c363012e529f5d316c6f912d0 Mon Sep 17 00:00:00 2001 From: Jeff Schroeder Date: Wed, 19 Aug 2015 22:09:13 -0500 Subject: [PATCH 4/5] A few minor cleanups in the http debug api server --- homeassistant/components/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/http.py b/homeassistant/components/http.py index 0b4f6165bed..8b2e2a6252c 100644 --- a/homeassistant/components/http.py +++ b/homeassistant/components/http.py @@ -205,7 +205,7 @@ class HomeAssistantHTTPServer(ThreadingMixIn, HTTPServer): self.serve_forever() def register_path(self, method, url, callback, require_auth=True): - """ Registers a path wit the server. """ + """ Registers a path with the server. """ self.paths.append((method, url, callback, require_auth)) def log_message(self, fmt, *args): @@ -487,7 +487,7 @@ class ServerSession: return self._expiry < date_util.utcnow() -class SessionStore: +class SessionStore(object): """ Responsible for storing and retrieving http sessions """ def __init__(self, enabled=True): """ Set up the session store """ From d4d798d71f51705f262a59f53070fe2307a2635d Mon Sep 17 00:00:00 2001 From: Jeff Schroeder Date: Wed, 19 Aug 2015 21:22:33 -0500 Subject: [PATCH 5/5] Error gracefully when unable to connect to home.nest.com --- homeassistant/components/thermostat/nest.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/thermostat/nest.py b/homeassistant/components/thermostat/nest.py index c724a4f6dea..656becd6a21 100644 --- a/homeassistant/components/thermostat/nest.py +++ b/homeassistant/components/thermostat/nest.py @@ -3,6 +3,7 @@ homeassistant.components.thermostat.nest ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Adds support for Nest thermostats. """ +import socket import logging from homeassistant.components.thermostat import (ThermostatDevice, STATE_COOL, @@ -35,12 +36,16 @@ def setup_platform(hass, config, add_devices, discovery_info=None): return napi = nest.Nest(username, password) - - add_devices([ - NestThermostat(structure, device) - for structure in napi.structures - for device in structure.devices - ]) + try: + add_devices([ + NestThermostat(structure, device) + for structure in napi.structures + for device in structure.devices + ]) + except socket.error: + logger.error( + "Connection error logging into the nest web service" + ) class NestThermostat(ThermostatDevice):