Peel the onions, cut in half lengthways and cut into wedges. Wash the thyme and shake dry. Steam the onions in olive oil until translucent. Caramelize with sugar and season with salt and pepper. Pour in the wine, add the thyme and let everything simmer for about 10 minutes. Cut out the stems of the tomatoes in a wedge shape. Briefly put the tomatoes in boiling water, remove them, rinse in cold water and peel them. Quarter, core and dice the tomatoes. Halve the olives. Add the tomatoes and olives to the onions, season with salt, pepper and vinegar and set aside.