diff --git a/homeassistant/components/frontend/__init__.py b/homeassistant/components/frontend/__init__.py index f00fb38809b..b43faf76952 100644 --- a/homeassistant/components/frontend/__init__.py +++ b/homeassistant/components/frontend/__init__.py @@ -51,7 +51,9 @@ def setup(hass, config): def _handle_get_root(handler, path_match, data): """ Renders the debug interface. """ - write = lambda txt: handler.wfile.write((txt + "\n").encode("UTF-8")) + def write(txt): + """ Helper to write text to the output. """ + handler.wfile.write((txt + "\n").encode("UTF-8")) handler.send_response(HTTP_OK) handler.send_header('Content-type', 'text/html; charset=utf-8') diff --git a/homeassistant/components/recorder.py b/homeassistant/components/recorder.py index a937a5a836b..488dfe9272f 100644 --- a/homeassistant/components/recorder.py +++ b/homeassistant/components/recorder.py @@ -78,6 +78,8 @@ def row_to_event(row): def run_information(point_in_time=None): + """ Returns information about current run or the run that + covers point_in_time. """ _verify_instance() if point_in_time is None: @@ -131,6 +133,8 @@ class RecorderRun(object): @property def where_after_start_run(self): + """ Returns SQL WHERE clause to select rows + created after the start of the run. """ return "created >= {} ".format(_adapt_datetime(self.start)) @property