Wash the potatoes and cook in boiling salted water for about 20 minutes. Then rinse with cold water and peel. Let it rest a little. In the meantime wash, clean and slice the tomatoes.
Peel and finely chop the onions and garlic. Heat oil and fry garlic in it. Sauté the minced meat thoroughly while turning. Season with salt, cayenne pepper and tomato paste. Melt the fat for the sauce.
Sauté the onion in it, sauté the flour. Add cream and stock while stirring constantly, bring to the boil. Grate cheese. Melt half in the sauce. Season to taste with salt, pepper and dried herbs.
Cut the potatoes into slices. Put potatoes, minced meat and tomatoes in layers in a large casserole dish. Spread the sauce 1 time in between and at the end. Sprinkle with remaining cheese. Bake in the preheated oven (electric cooker: 200 °C/ gas: level 3) for about 25 minutes.
Serve sprinkled with chopped thyme as desired.