mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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
|
entry.entry_id
|
||||||
]
|
]
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
[
|
OpenGarageBinarySensor(
|
||||||
OpenGarageBinarySensor(
|
open_garage_data_coordinator,
|
||||||
open_garage_data_coordinator,
|
cast(str, entry.unique_id),
|
||||||
cast(str, entry.unique_id),
|
description,
|
||||||
description,
|
)
|
||||||
)
|
for description in SENSOR_TYPES
|
||||||
for description in SENSOR_TYPES
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,15 +65,13 @@ async def async_setup_entry(
|
|||||||
entry.entry_id
|
entry.entry_id
|
||||||
]
|
]
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
[
|
OpenGarageSensor(
|
||||||
OpenGarageSensor(
|
open_garage_data_coordinator,
|
||||||
open_garage_data_coordinator,
|
cast(str, entry.unique_id),
|
||||||
cast(str, entry.unique_id),
|
description,
|
||||||
description,
|
)
|
||||||
)
|
for description in SENSOR_TYPES
|
||||||
for description in SENSOR_TYPES
|
if description.key in open_garage_data_coordinator.data
|
||||||
if description.key in open_garage_data_coordinator.data
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user