Remove legacy event lookups from logbook (#89945)
Events recorded with Home Assistant 2022.5.x or older will no longer display context information in the logbook
This commit is contained in:
parent
aebe4c66a6
commit
f27d73fc34
2 changed files with 1 additions and 43 deletions
|
@ -12,12 +12,7 @@ from homeassistant.components.recorder.db_schema import (
|
|||
States,
|
||||
)
|
||||
|
||||
from .common import (
|
||||
apply_states_filters,
|
||||
legacy_select_events_context_id,
|
||||
select_events_without_states,
|
||||
select_states,
|
||||
)
|
||||
from .common import apply_states_filters, select_events_without_states, select_states
|
||||
|
||||
|
||||
def all_stmt(
|
||||
|
@ -33,9 +28,6 @@ def all_stmt(
|
|||
lambda: select_events_without_states(start_day, end_day, event_types)
|
||||
)
|
||||
if context_id_bin is not None:
|
||||
# Once all the old `state_changed` events
|
||||
# are gone from the database remove the
|
||||
# _legacy_select_events_context_id()
|
||||
stmt += lambda s: s.where(Events.context_id_bin == context_id_bin).union_all(
|
||||
_states_query_for_context_id(
|
||||
start_day,
|
||||
|
@ -43,12 +35,6 @@ def all_stmt(
|
|||
# https://github.com/python/mypy/issues/2608
|
||||
context_id_bin, # type:ignore[arg-type]
|
||||
),
|
||||
legacy_select_events_context_id(
|
||||
start_day,
|
||||
end_day,
|
||||
# https://github.com/python/mypy/issues/2608
|
||||
context_id_bin, # type:ignore[arg-type]
|
||||
),
|
||||
)
|
||||
else:
|
||||
if events_entity_filter is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue