mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use generators for async_add_entities in Abode (#76569)
This commit is contained in:
@@ -32,12 +32,10 @@ async def async_setup_entry(
|
||||
"""Set up Abode light devices."""
|
||||
data: AbodeSystem = hass.data[DOMAIN]
|
||||
|
||||
entities = []
|
||||
|
||||
for device in data.abode.get_devices(generic_type=CONST.TYPE_LIGHT):
|
||||
entities.append(AbodeLight(data, device))
|
||||
|
||||
async_add_entities(entities)
|
||||
async_add_entities(
|
||||
AbodeLight(data, device)
|
||||
for device in data.abode.get_devices(generic_type=CONST.TYPE_LIGHT)
|
||||
)
|
||||
|
||||
|
||||
class AbodeLight(AbodeDevice, LightEntity):
|
||||
|
||||
Reference in New Issue
Block a user