From 1bac51142dc80228e3a1e1bc0b085ce3b40162ff Mon Sep 17 00:00:00 2001 From: Robert Svensson Date: Tue, 5 Mar 2024 21:13:14 +0100 Subject: [PATCH] Do not use list comprehension in async_add_entities in Unifi (#112435) Do not use list comprehension in async_add_entities --- homeassistant/components/unifi/hub/hub.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/unifi/hub/hub.py b/homeassistant/components/unifi/hub/hub.py index c9054152abb..0188adf5c3f 100644 --- a/homeassistant/components/unifi/hub/hub.py +++ b/homeassistant/components/unifi/hub/hub.py @@ -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()