mirror of
https://github.com/home-assistant/core.git
synced 2025-08-08 07:05:07 +02:00
Bugfix: remove superfluous domain filter
This filter is already applied later in the function by the `filters` object, where it is conditionally applied when appropriate. This fixes the problem where we get a domain filter even when searching for a single entity_id, which needlessly harms the query's performance.
This commit is contained in:
@@ -123,8 +123,7 @@ def get_states(hass, utc_point_in_time, entity_ids=None, run=None,
|
||||
func.max(States.state_id).label('max_state_id')
|
||||
).filter(
|
||||
(States.created >= run.start) &
|
||||
(States.created < utc_point_in_time) &
|
||||
(~States.domain.in_(IGNORE_DOMAINS)))
|
||||
(States.created < utc_point_in_time))
|
||||
|
||||
if filters:
|
||||
most_recent_state_ids = filters.apply(most_recent_state_ids,
|
||||
|
Reference in New Issue
Block a user