mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 01:58:20 +00:00
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
3c5b5ca49b
commit
b8b654a160
@ -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…
x
Reference in New Issue
Block a user