Fix logbook filtering entities (#18721)
* Fix logbook filtering entities * Fix flaky test
This commit is contained in:
1 parent
775c909a8c
commit
f3047b9c03
2 files changed
+9
-3
No files matched your search
@@ -391,9 +391,9 @@ def _get_events(hass, config, start_day, end_day, entity_id=None):
|
||||
.filter(Events.event_type.in_(ALL_EVENT_TYPES)) \
|
||||
.filter((Events.time_fired > start_day)
|
||||
& (Events.time_fired < end_day)) \
|
||||
.filter((States.last_updated == States.last_changed)
|
||||
| (States.state_id.is_(None))) \
|
||||
.filter(States.entity_id.in_(entity_ids))
|
||||
.filter(((States.last_updated == States.last_changed) &
|
||||
States.entity_id.in_(entity_ids))
|
||||
| (States.state_id.is_(None)))
|
||||
|
||||
events = execute(query)
|
||||
|
||||
|
||||
Reference in new issue
Block a user