Tweak entity/source WS command handler (#100272)

This commit is contained in:
Erik Montnemery 2023-09-13 11:14:01 +02:00 committed by GitHub
parent e5de7eacad
commit aedd06b9a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -599,10 +599,10 @@ def _serialize_entity_sources(
entity_infos: dict[str, entity.EntityInfo]
) -> dict[str, Any]:
"""Prepare a websocket response from a dict of entity sources."""
result = {}
for entity_id, entity_info in entity_infos.items():
result[entity_id] = {"domain": entity_info["domain"]}
return result
return {
entity_id: {"domain": entity_info["domain"]}
for entity_id, entity_info in entity_infos.items()
}
@callback