mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Remove list comprehension when adding entities in opengarage (#112430)
This commit is contained in:
parent
3cfe346656
commit
85edafa887
@ -35,14 +35,12 @@ async def async_setup_entry(
|
||||
entry.entry_id
|
||||
]
|
||||
async_add_entities(
|
||||
[
|
||||
OpenGarageBinarySensor(
|
||||
open_garage_data_coordinator,
|
||||
cast(str, entry.unique_id),
|
||||
description,
|
||||
)
|
||||
for description in SENSOR_TYPES
|
||||
],
|
||||
OpenGarageBinarySensor(
|
||||
open_garage_data_coordinator,
|
||||
cast(str, entry.unique_id),
|
||||
description,
|
||||
)
|
||||
for description in SENSOR_TYPES
|
||||
)
|
||||
|
||||
|
||||
|
@ -65,15 +65,13 @@ async def async_setup_entry(
|
||||
entry.entry_id
|
||||
]
|
||||
async_add_entities(
|
||||
[
|
||||
OpenGarageSensor(
|
||||
open_garage_data_coordinator,
|
||||
cast(str, entry.unique_id),
|
||||
description,
|
||||
)
|
||||
for description in SENSOR_TYPES
|
||||
if description.key in open_garage_data_coordinator.data
|
||||
],
|
||||
OpenGarageSensor(
|
||||
open_garage_data_coordinator,
|
||||
cast(str, entry.unique_id),
|
||||
description,
|
||||
)
|
||||
for description in SENSOR_TYPES
|
||||
if description.key in open_garage_data_coordinator.data
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user