Improve lists in integrations [L-M] (#113227)

* Improve lists in integrations [L-M]

* Update homeassistant/components/mailbox/__init__.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Fix

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
This commit is contained in:
Joost Lekkerkerker 2024-03-13 21:28:21 +01:00 committed by GitHub
parent 4547131bbc
commit 595d07f1c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 200 additions and 232 deletions

View file

@ -53,13 +53,12 @@ async def async_setup_entry(
async_add_entities: AddEntitiesCallback,
) -> None:
"""Set up LCN light entities from a config entry."""
entities = []
for entity_config in config_entry.data[CONF_ENTITIES]:
if entity_config[CONF_DOMAIN] == DOMAIN_LIGHT:
entities.append(create_lcn_light_entity(hass, entity_config, config_entry))
async_add_entities(entities)
async_add_entities(
create_lcn_light_entity(hass, entity_config, config_entry)
for entity_config in config_entry.data[CONF_ENTITIES]
if entity_config[CONF_DOMAIN] == DOMAIN_LIGHT
)
class LcnOutputLight(LcnEntity, LightEntity):