Skip to content

Commit

Permalink
Use a listcomp for more history results (home-assistant#121830)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored and adriencog committed Jul 13, 2024
1 parent 7e590a8 commit 08f1cec
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions homeassistant/components/recorder/history/modern.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,16 +738,18 @@ def _sorted_states_to_dict(
or split_entity_id(entity_id)[0] in NEED_ATTRIBUTE_DOMAINS
):
ent_results.extend(
state_class(
db_state,
attr_cache,
start_time_ts,
entity_id,
db_state[state_idx],
db_state[last_updated_ts_idx],
False,
)
for db_state in group
[
state_class(
db_state,
attr_cache,
start_time_ts,
entity_id,
db_state[state_idx],
db_state[last_updated_ts_idx],
False,
)
for db_state in group
]
)
continue

Expand Down

0 comments on commit 08f1cec

Please sign in to comment.