mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Remove list comprehension when adding entities in Vallox (#112446)
This commit is contained in:
parent
862d04c035
commit
fc732ecf17
@ -74,8 +74,6 @@ async def async_setup_entry(
|
||||
data = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
ValloxBinarySensorEntity(data["name"], data["coordinator"], description)
|
||||
for description in BINARY_SENSOR_ENTITIES
|
||||
]
|
||||
ValloxBinarySensorEntity(data["name"], data["coordinator"], description)
|
||||
for description in BINARY_SENSOR_ENTITIES
|
||||
)
|
||||
|
@ -111,10 +111,8 @@ async def async_setup_entry(
|
||||
data = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
ValloxNumberEntity(
|
||||
data["name"], data["coordinator"], description, data["client"]
|
||||
)
|
||||
for description in NUMBER_ENTITIES
|
||||
]
|
||||
ValloxNumberEntity(
|
||||
data["name"], data["coordinator"], description, data["client"]
|
||||
)
|
||||
for description in NUMBER_ENTITIES
|
||||
)
|
||||
|
@ -262,8 +262,6 @@ async def async_setup_entry(
|
||||
coordinator = hass.data[DOMAIN][entry.entry_id]["coordinator"]
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
description.entity_type(name, coordinator, description)
|
||||
for description in SENSOR_ENTITIES
|
||||
]
|
||||
description.entity_type(name, coordinator, description)
|
||||
for description in SENSOR_ENTITIES
|
||||
)
|
||||
|
@ -92,10 +92,8 @@ async def async_setup_entry(
|
||||
data = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
ValloxSwitchEntity(
|
||||
data["name"], data["coordinator"], description, data["client"]
|
||||
)
|
||||
for description in SWITCH_ENTITIES
|
||||
]
|
||||
ValloxSwitchEntity(
|
||||
data["name"], data["coordinator"], description, data["client"]
|
||||
)
|
||||
for description in SWITCH_ENTITIES
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user