Fixed bug in history component where the entity id filtering was not being applied correctly

pull/86/head
jamespcole 2015-04-07 02:25:03 +10:00
parent 89527d3bb2
commit 100a75908b
1 changed files with 3 additions and 1 deletions

View File

@ -50,8 +50,10 @@ def state_changes_during_period(start_time, end_time=None, entity_id=None):
result = defaultdict(list)
entity_ids = [entity_id] if entity_id is not None else None
# Get the states at the start time
for state in get_states(start_time):
for state in get_states(start_time, entity_ids):
state.last_changed = start_time
result[state.entity_id].append(state)