Fix device_ids being filtered when entities also specified in the logbook (#72122)

This commit is contained in:
J. Nick Koston 2022-05-18 23:27:31 -05:00 committed by GitHub
parent a6402697bb
commit 272e65f56d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -59,7 +59,6 @@ from homeassistant.helpers.entityfilter import (
INCLUDE_EXCLUDE_BASE_FILTER_SCHEMA,
EntityFilter,
convert_include_exclude_filter,
generate_filter,
)
from homeassistant.helpers.integration_platform import (
async_process_integration_platforms,
@ -579,8 +578,8 @@ def _get_events(
] = hass.data.get(DOMAIN, {})
format_time = _row_time_fired_timestamp if timestamp else _row_time_fired_isoformat
entity_name_cache = EntityNameCache(hass)
if entity_ids is not None:
entities_filter = generate_filter([], entity_ids, [], [])
if entity_ids or device_ids:
entities_filter = None
def yield_rows(query: Query) -> Generator[Row, None, None]:
"""Yield rows from the database."""