def __init__(
        self,
        hass: HomeAssistant,
        entry_id: str,
        data: Mapping[str, Any],
        default_port: int = PORT_ANY,
        start_direct: bool = False,
        enable_device_firmware_check: bool = DEFAULT_ENABLE_DEVICE_FIRMWARE_CHECK,
    ) -> None:
        """Create the required config for the ControlUnit."""
        self._hass: Final = hass
        self._entry_id: Final = entry_id
        self._data: Final = data
        self._default_callback_port: Final = default_port
        self._start_direct: Final = start_direct
        self._enable_device_firmware_check: Final = enable_device_firmware_check

        # central
        self._instance_name: Final[str] = _cleanup_instance_name(instance_name=data[CONF_INSTANCE_NAME])
        self._host: Final[str] = data[CONF_HOST]
        self._username: Final[str] = data[CONF_USERNAME]
        self._password: Final[str] = data[CONF_PASSWORD]
        self._tls: Final[bool] = data[CONF_TLS]
        self._verify_tls: Final[bool] = data[CONF_VERIFY_TLS]
        self._callback_host: Final[str | None] = data.get(CONF_CALLBACK_HOST)
        self._callback_port: Final[int | None] = data.get(CONF_CALLBACK_PORT)
        self._json_port: Final[int | None] = data.get(CONF_JSON_PORT)

        # interface_config
        self._interface_config = data.get(CONF_INTERFACE, {})
        # advanced_config
        ac = data.get(CONF_ADVANCED_CONFIG, {})
        self._enable_mqtt: Final[bool] = ac.get(CONF_ENABLE_MQTT, DEFAULT_ENABLE_MQTT)
        self._enable_program_scan: Final[bool] = ac.get(CONF_ENABLE_PROGRAM_SCAN, DEFAULT_ENABLE_PROGRAM_SCAN)
        self._enable_system_notifications: Final[bool] = ac.get(
            CONF_ENABLE_SYSTEM_NOTIFICATIONS, DEFAULT_ENABLE_SYSTEM_NOTIFICATIONS
        )
        self._enable_sysvar_scan: Final[bool] = ac.get(CONF_ENABLE_SYSVAR_SCAN, DEFAULT_ENABLE_SYSVAR_SCAN)
        self._listen_on_all_ip: Final[bool] = ac.get(CONF_LISTEN_ON_ALL_IP, DEFAULT_LISTEN_ON_ALL_IP)
        self._mqtt_prefix: Final[str] = ac.get(CONF_MQTT_PREFIX, DEFAULT_MQTT_PREFIX)
        self._program_markers: Final[tuple[DescriptionMarker | str, ...]] = (
            program_markers if (program_markers := ac.get(CONF_PROGRAM_MARKERS)) else DEFAULT_PROGRAM_MARKERS
        )
        self._sys_scan_interval: Final[int] = ac.get(CONF_SYS_SCAN_INTERVAL, DEFAULT_SYS_SCAN_INTERVAL)
        self._sysvar_markers: Final[tuple[DescriptionMarker | str, ...]] = (
            sysvar_markers if (sysvar_markers := ac.get(CONF_SYSVAR_MARKERS)) else DEFAULT_SYSVAR_MARKERS
        )
        self._un_ignore: Final[tuple[str, ...]] = ac.get(CONF_UN_IGNORES, DEFAULT_UN_IGNORES)
Create the required config for the ControlUnit.
custom_components/homematicip_local/control_unit.py