Peel and finely chop the onion. Wash the thyme, dab dry and remove the leaves. Heat the oil in a pan. Fry the minced onion for about 3 minutes until crumbly. Fry the onion briefly. Season with salt, pepper and thyme.
Add the tomatoes and juice, bring to the boil and chop a little. Season with salt, pepper, 1 pinch of sugar and nutmeg.
Preheat oven (electric cooker: 200°C/circulating air: 175°C/gas: level 3). Wash and quarter the pumpkin. Scrape out the seeds and fibres. Pumpkin with skin first cut into thin slices, then cut in half crosswise.
Put the pumpkin and chopped pumpkin sauce in an ovenproof dish. Bake in a hot oven for 40-45 minutes.
Grate cheese finely and sprinkle over the casserole after about 20 minutes baking time. Mashed potatoes taste good with it.