String formatting and max line length - Part 2 (#84393)
This commit is contained in:
parent
7e682af472
commit
cb13418bab
69 changed files with 431 additions and 174 deletions
|
@ -667,7 +667,9 @@ def _async_get_matching_entities(
|
|||
"""Fetch all entities or entities in the given domains."""
|
||||
ent_reg = entity_registry.async_get(hass)
|
||||
return {
|
||||
state.entity_id: f"{state.attributes.get(ATTR_FRIENDLY_NAME, state.entity_id)} ({state.entity_id})"
|
||||
state.entity_id: (
|
||||
f"{state.attributes.get(ATTR_FRIENDLY_NAME, state.entity_id)} ({state.entity_id})"
|
||||
)
|
||||
for state in sorted(
|
||||
hass.states.async_all(domains and set(domains)),
|
||||
key=lambda item: item.entity_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue