Apparatus, consisting of a probe, configured to be inserted into a body cavity, and an electrode having an outer surface and an inner surface connected to the probe. The apparatus also includes a temperature sensor, protruding from the outer surface of the electrode, which is configured to measure a temperature of the body cavity.