Do not use list comprehension in async_add_entities in Unifi (#112435)
Do not use list comprehension in async_add_entities
This commit is contained in:
parent
968f5f1a34
commit
1bac51142d
1 changed files with 4 additions and 6 deletions
|
@ -196,12 +196,10 @@ class UnifiHub:
|
|||
def async_add_unifi_entities() -> None:
|
||||
"""Add UniFi entity."""
|
||||
async_add_entities(
|
||||
[
|
||||
unifi_platform_entity(obj_id, self, description)
|
||||
for description in descriptions
|
||||
for obj_id in description.api_handler_fn(self.api)
|
||||
if self._async_should_add_entity(description, obj_id)
|
||||
]
|
||||
unifi_platform_entity(obj_id, self, description)
|
||||
for description in descriptions
|
||||
for obj_id in description.api_handler_fn(self.api)
|
||||
if self._async_should_add_entity(description, obj_id)
|
||||
)
|
||||
|
||||
async_add_unifi_entities()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue