Repository: home-assistant/core
File: homeassistant/helpers/service.py (Python)

Code before:
            (entity_domain, service_domain)
        )
        if entities is None:
            return {}
        return entities

    hass.services.async_register(
        service_domain,
        service_name,
        partial(
            entity_service_call,
            hass,
            get_entities,
            service_func,
            entity_device_classes=entity_device_classes,
            required_features=required_features,
        ),
        schema,
        supports_response,
        job_type=HassJobType.Coroutinefunction,
        description_placeholders=description_placeholders,
    )


@callback
def get_service_config_entry(
    hass: HomeAssistant, domain: str, entry_id: str
) -> ConfigEntry:
    """Get and validate a service config entry."""
    config_entry = hass.config_entries.async_get_entry(entry_id)
    if not config_entry:
        raise ServiceValidationError(
            translation_domain=HOMEASSISTANT_DOMAIN,
            translation_key="service_config_entry_not_found",
            translation_placeholders={
                "domain": domain,
                "entry_id": entry_id,
            },
        )
    if config_entry.domain != domain:
        raise ServiceValidationError(
            translation_domain=HOMEASSISTANT_DOMAIN,
            translation_key="service_config_entry_wrong_domain",
            translation_placeholders={
                "domain": domain,
                "entry_title": config_entry.title,
            },
        )
    if config_entry.state is not ConfigEntryState.LOADED:
        raise ServiceValidationError(
            translation_domain=HOMEASSISTANT_DOMAIN,

Review comment (suggestion):
```suggestion
def async_get_service_config_entry(
```
As this is a public facing function that should be called within the event loop, it should be prefixed with `async_`.

Code after:
            (entity_domain, service_domain)
        )
        if entities is None:
            return {}
        return entities

    hass.services.async_register(
        service_domain,
        service_name,
        partial(
            entity_service_call,
            hass,
            get_entities,
            service_func,
            entity_device_classes=entity_device_classes,
            required_features=required_features,
        ),
        schema,
        supports_response,
        job_type=HassJobType.Coroutinefunction,
        description_placeholders=description_placeholders,
    )


@callback
def async_get_config_entry(
    hass: HomeAssistant, domain: str, entry_id: str
) -> ConfigEntry:
    """Get and validate a service config entry."""
    config_entry = hass.config_entries.async_get_entry(entry_id)
    if not config_entry:
        raise ServiceValidationError(
            translation_domain=HOMEASSISTANT_DOMAIN,
            translation_key="service_config_entry_not_found",
            translation_placeholders={
                "domain": domain,
                "entry_id": entry_id,
            },
        )
    if config_entry.domain != domain:
        raise ServiceValidationError(
            translation_domain=HOMEASSISTANT_DOMAIN,
            translation_key="service_config_entry_wrong_domain",
            translation_placeholders={
                "domain": domain,
                "entry_title": config_entry.title,
            },
        )
    if config_entry.state is not ConfigEntryState.LOADED:
        raise ServiceValidationError(
            translation_domain=HOMEASSISTANT_DOMAIN,