mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +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,7 +65,6 @@ 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),
|
||||||
@ -73,7 +72,6 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
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