def async_process_ha_core_config(hass, config):
    """Set up the Home Assistant configuration."""
    try:
        # ha >= "2023.11.0"
        from homeassistant.core_config import async_process_ha_core_config

        return async_process_ha_core_config(hass, config)
    except ModuleNotFoundError:
        import homeassistant.config as config_util

        return config_util.async_process_ha_core_config(hass, config)
Set up the Home Assistant configuration.
tests/test_switch.py