One or more non-transitory computer-readable storage media storing one or more computer programs including computer-executable instruction that, when executed by one or more processors of a clothes treating apparatus individually or collectively, cause the clothes treating apparatus to perform operations, the clothes treating apparatus including a housing, a tub within the housing, a drum within the tub and configured to accommodate laundry, a heater configured to heat air, a fan configured to blow air heated by the heater to inside of the tub, a discharge device including a discharge flow path through which air discharged from the tub is guided to outside of the housing, and a humidity sensor provided on the discharge flow path, the operations comprising:
- performing a drying cycle by operating the heater and the fan;
- according to the humidity sensor being identified as abnormal during the drying cycle, terminating the drying cycle based on a weight of the laundry accommodated in the drum;
- and
- according to the humidity sensor being not identified as abnormal during the drying cycle, terminating the drying cycle based on a humidity value detected by the humidity sensor.