diff --git a/homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html b/homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html index e454fee9ed7..6d5bd917fb5 100644 --- a/homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html +++ b/homeassistant/components/frontend/www_static/polymer/components/logbook-entry.html @@ -50,7 +50,8 @@ var uiActions = window.hass.uiActions; Polymer({ - entityClicked: function() { + entityClicked: function(ev) { + ev.preventDefault(); uiActions.showMoreInfoDialog(this.entryObj.entityId); } }); diff --git a/homeassistant/components/logbook.py b/homeassistant/components/logbook.py index 810b06b25da..3b42ffdee57 100644 --- a/homeassistant/components/logbook.py +++ b/homeassistant/components/logbook.py @@ -39,8 +39,7 @@ def setup(hass, config): def _handle_get_logbook(handler, path_match, data): """ Return logbook entries. """ start_today = datetime.now().date() - import time - print(time.mktime(start_today.timetuple())) + handler.write_json(humanify( recorder.query_events(QUERY_EVENTS_AFTER, (start_today,)))) @@ -123,7 +122,7 @@ def humanify(events): to_state = State.from_dict(event.data.get('new_state')) - if not to_state: + if not to_state or to_state.last_changed != to_state.last_updated: continue domain = to_state.domain