Merge pull request #352 from SEJeff/minor-fixes

A few minor bugfixes
This commit is contained in:
Paulus Schoutsen 2015-09-12 13:52:37 -07:00
commit 6cfca09daf
5 changed files with 16 additions and 11 deletions

View File

@ -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')

View File

@ -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 """

View File

@ -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)

View File

@ -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:

View File

@ -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):