Use a listcomp for more history results (#121830)

This commit is contained in:
J. Nick Koston 2024-07-12 09:10:21 -05:00 committed by GitHub
parent 156e92a4cd
commit 8a52ffb967
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -738,6 +738,7 @@ 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,
@ -748,6 +749,7 @@ def _sorted_states_to_dict(
False,
)
for db_state in group
]
)
continue