def _all_unique_names(value):
    """Validate that all entities have a unique profile name."""
    hosts = [device[CONF_NAME] for device in value]
    schema = vol.Schema(vol.Unique())
    schema(hosts)
    return value
Validate that all entities have a unique profile name.
custom_components/adaptive_lighting/__init__.py