mirror of
https://github.com/home-assistant/core.git
synced 2025-08-10 08:05:06 +02:00
Remove list comprehension when adding entities in Wallbox (#112433)
This commit is contained in:
committed by
GitHub
parent
b025d6c6f2
commit
968f5f1a34
@@ -42,11 +42,9 @@ async def async_setup_entry(
|
||||
raise PlatformNotReady from exc
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
WallboxLock(coordinator, description)
|
||||
for ent in coordinator.data
|
||||
if (description := LOCK_TYPES.get(ent))
|
||||
]
|
||||
WallboxLock(coordinator, description)
|
||||
for ent in coordinator.data
|
||||
if (description := LOCK_TYPES.get(ent))
|
||||
)
|
||||
|
||||
|
||||
|
@@ -92,11 +92,9 @@ async def async_setup_entry(
|
||||
raise PlatformNotReady from exc
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
WallboxNumber(coordinator, entry, description)
|
||||
for ent in coordinator.data
|
||||
if (description := NUMBER_TYPES.get(ent))
|
||||
]
|
||||
WallboxNumber(coordinator, entry, description)
|
||||
for ent in coordinator.data
|
||||
if (description := NUMBER_TYPES.get(ent))
|
||||
)
|
||||
|
||||
|
||||
|
@@ -161,11 +161,9 @@ async def async_setup_entry(
|
||||
coordinator: WallboxCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
WallboxSensor(coordinator, description)
|
||||
for ent in coordinator.data
|
||||
if (description := SENSOR_TYPES.get(ent))
|
||||
]
|
||||
WallboxSensor(coordinator, description)
|
||||
for ent in coordinator.data
|
||||
if (description := SENSOR_TYPES.get(ent))
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user