from homeassistant.helpers.entity_component import EntityComponent DOMAIN = "example" async def async_setup(hass, config): """Set up the Example component.""" entity_component = EntityComponent(_LOGGER, DOMAIN, hass) # Create the custom entities light_entities = [ExampleLightEntity("light1"), ExampleLightEntity("light2")] # Add the entities to Home Assistant await entity_component.async_add_entities(light_entities) return TrueIn this code snippet, `EntityComponent` is used to create a component for a set of custom light entities (defined elsewhere in the code). The `async_add_entities` method is then used to add the entities to Home Assistant. The `homeassistant.helpers.entity_component` package is part of the Home Assistant Core library.