mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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
968f5f1a34
commit
1bac51142d
@ -196,12 +196,10 @@ class UnifiHub:
|
|||||||
def async_add_unifi_entities() -> None:
|
def async_add_unifi_entities() -> None:
|
||||||
"""Add UniFi entity."""
|
"""Add UniFi entity."""
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
[
|
|
||||||
unifi_platform_entity(obj_id, self, description)
|
unifi_platform_entity(obj_id, self, description)
|
||||||
for description in descriptions
|
for description in descriptions
|
||||||
for obj_id in description.api_handler_fn(self.api)
|
for obj_id in description.api_handler_fn(self.api)
|
||||||
if self._async_should_add_entity(description, obj_id)
|
if self._async_should_add_entity(description, obj_id)
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
async_add_unifi_entities()
|
async_add_unifi_entities()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user