async def async_setup(hass: HomeAssistant, hass_config: dict):
    config = (hass_config.get(DOMAIN) or {})
    if (CONF_LOGGER in config):
        logger.init(__name__, config[CONF_LOGGER], hass.config.config_dir)
        info = (await hass.helpers.system_info.async_get_system_info())
        _LOGGER.debug(f'SysInfo: {info}')
        if ('debug_mode' in config[CONF_LOGGER]):
            setattr(Gateway3, 'debug_mode', config[CONF_LOGGER]['debug_mode'])
    if (CONF_DEVICES in config):
        for (k, v) in config[CONF_DEVICES].items():
            k = k.replace(':', '').lower()
            DevicesRegistry.defaults[k] = v
    hass.data[DOMAIN] = {CONF_ATTRIBUTES_TEMPLATE: config.get(CONF_ATTRIBUTES_TEMPLATE)}
    (await _handle_device_remove(hass))
    return True
async def async_setup(hass: HomeAssistant, hass_config: dict):
    config = (hass_config.get(DOMAIN) or {})
    if (CONF_LOGGER in config):
        logger.init(__name__, config[CONF_LOGGER], hass.config.config_dir)
        info = (await hass.helpers.system_info.async_get_system_info())
        _LOGGER.debug(f'SysInfo: {info}')
        if ('debug_mode' in config[CONF_LOGGER]):
            setattr(Gateway3, 'debug_mode', config[CONF_LOGGER]['debug_mode'])
    if (CONF_DEVICES in config):
        for (k, v) in config[CONF_DEVICES].items():
            k = k.replace(':', ).lower()
            DevicesRegistry.defaults[k] = v
    hass.data[DOMAIN] = {CONF_ATTRIBUTES_TEMPLATE: config.get(CONF_ATTRIBUTES_TEMPLATE)}
    (await _handle_device_remove(hass))
    return True