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.pull/8632/head
parent
5d810dae86
commit
76a6371705
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue