Fixed incorrect event-order (#4605)
parent
9db1ff8cd4
commit
77d568dc47
|
@ -139,9 +139,10 @@ class LogbookView(HomeAssistantView):
|
||||||
def get_results():
|
def get_results():
|
||||||
"""Query DB for results."""
|
"""Query DB for results."""
|
||||||
events = recorder.get_model('Events')
|
events = recorder.get_model('Events')
|
||||||
query = recorder.query('Events').filter(
|
query = recorder.query('Events').order_by(
|
||||||
(events.time_fired > start_day) &
|
events.time_fired).filter(
|
||||||
(events.time_fired < end_day))
|
(events.time_fired > start_day) &
|
||||||
|
(events.time_fired < end_day))
|
||||||
events = recorder.execute(query)
|
events = recorder.execute(query)
|
||||||
return _exclude_events(events, self.config)
|
return _exclude_events(events, self.config)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue