mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
commit
6cfca09daf
@ -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')
|
||||
|
||||
|
@ -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 """
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user