mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Bugfix for states at point in time on new databases
This commit is contained in:
parent
1c593c9c3c
commit
a21673069b
@ -67,6 +67,10 @@ def get_states(point_in_time, entity_ids=None, run=None):
|
|||||||
if run is None:
|
if run is None:
|
||||||
run = recorder.run_information(point_in_time)
|
run = recorder.run_information(point_in_time)
|
||||||
|
|
||||||
|
# History did not run before point_in_time
|
||||||
|
if run is None:
|
||||||
|
return []
|
||||||
|
|
||||||
where = run.where_after_start_run + "AND created < ? "
|
where = run.where_after_start_run + "AND created < ? "
|
||||||
where_data = [point_in_time]
|
where_data = [point_in_time]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user