mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Initial (#5811)
This commit is contained in:
parent
4f20a2d3ea
commit
612aa1cf21
@ -118,10 +118,12 @@ def run_information(point_in_time: Optional[datetime]=None):
|
|||||||
start=_INSTANCE.recording_start,
|
start=_INSTANCE.recording_start,
|
||||||
closed_incorrect=False)
|
closed_incorrect=False)
|
||||||
|
|
||||||
with session_scope():
|
with session_scope() as session:
|
||||||
return query('RecorderRuns').filter(
|
res = query(recorder_runs).filter(
|
||||||
(recorder_runs.start < point_in_time) &
|
(recorder_runs.start < point_in_time) &
|
||||||
(recorder_runs.end > point_in_time)).first()
|
(recorder_runs.end > point_in_time)).first()
|
||||||
|
session.expunge(res)
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
def setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user