mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove list comprehension when adding entities in Wallbox (#112433)
This commit is contained in:
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))
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user