Loading integration config in setup()

I’m writing my first integration. And got everything working like it should do. But when I start implementing a service for the integration I cannot load my config of my integration. I tried using hass.conf.[DOMAIN][“key”] and different tries on the hass en configEntry objects without any luck. I already have a sync_setup_entry where I can load my configuration but when I add the service their it does not show up. So I placed it back to the setup() function (where it should be if the documention is still correct) but there I cannot load my configuration.

def setup(hass: HomeAssistant, entry: ConfigEntry) -> bool:

    def handle_manual_level_set(call: ServiceCall):
        service: renson.RensonVentilation = renson.RensonVentilation(
           #place where I need to config
        )
        level = call.data.get("manual_level", "Off").upper()
        service.set_manual_level(rensonEnums.ManualLevel[level])

    hass.services.register(DOMAIN, "manual_level", handle_manual_level_set)
    return True

How can I get my config (I implemented the config flow for my integration) in setup() method?

I do this


async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
    email = config.get(DOMAIN).get(CONF_EMAIL)
    password = config.get(DOMAIN).get(CONF_PASSWORD)

When I do this:

async def async_setup(hass: HomeAssistant, entry: ConfigType) -> bool:
    """Handle all the services of the Renson API."""

    service: renson.RensonVentilation = renson.RensonVentilation(
        entry.get(DOMAIN).get("host")
    )

I get following exception:

Traceback (most recent call last):
  File "/workspaces/ha-core/homeassistant/setup.py", line 255, in _async_setup_component
    result = await task
  File "/workspaces/ha-core/homeassistant/components/renson_endura_delta/__init__.py", line 39, in async_setup
    entry.get(DOMAIN).get("host")
AttributeError: 'NoneType' object has no attribute 'get'

I find the sollution of my problem. I move my code to the setup() instead of async_setup and uses

hass.config_entries.async_entries(DOMAIN)[0].data["host"]