mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Remove list comprehension when adding entities in Nextcloud (#112429)
This commit is contained in:
parent
1824ff6438
commit
3cfe346656
@ -58,11 +58,9 @@ async def async_setup_entry(
|
||||
"""Set up the Nextcloud binary sensors."""
|
||||
coordinator: NextcloudDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
async_add_entities(
|
||||
[
|
||||
NextcloudBinarySensor(coordinator, entry, sensor)
|
||||
for sensor in BINARY_SENSORS
|
||||
if sensor.key in coordinator.data
|
||||
]
|
||||
NextcloudBinarySensor(coordinator, entry, sensor)
|
||||
for sensor in BINARY_SENSORS
|
||||
if sensor.key in coordinator.data
|
||||
)
|
||||
|
||||
|
||||
|
@ -606,11 +606,9 @@ async def async_setup_entry(
|
||||
"""Set up the Nextcloud sensors."""
|
||||
coordinator: NextcloudDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
async_add_entities(
|
||||
[
|
||||
NextcloudSensor(coordinator, entry, sensor)
|
||||
for sensor in SENSORS
|
||||
if sensor.key in coordinator.data
|
||||
]
|
||||
NextcloudSensor(coordinator, entry, sensor)
|
||||
for sensor in SENSORS
|
||||
if sensor.key in coordinator.data
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user