In a portable electronic device, an ambient temperature is sensed by means of a temperature sensor. In addition, it is assessed if the portable electronic device is exposed to condensation. A corresponding condensation indicator is provided. The condensation indicator is determined based on a dew point and based on sensed temperature values of the past or temperature derived from the past sensed temperature values.