If a repair is required under a residential lease agreement or required under a law, administrative rule, or local ordinance or regulation, and the reasonable cost of the repair does not exceed the lesser of $500 or one-half of the monthly rent, the tenant may notify the landlord in writing by registered or certified mail or other restricted delivery service to the address of the landlord or an agent of the landlord as indicated on the lease agreement; if an address is not listed, the tenant may send notice to the landlord's last known address of the tenant's intention to have the repair made at the landlord's expense. If the landlord fails to make the repair within 14 days after being notified by the tenant as provided above or more promptly as conditions require in the case of an emergency, the tenant may have the repair made in a workmanlike manner and in compliance with the appropriate law, administrative rule, or local ordinance or regulation. Emergencies include conditions that will cause irreparable harm to the apartment or any fixture attached to the apartment if not immediately repaired or any condition that poses an immediate threat to the health or safety of any occupant of the dwelling or any common area. After submitting to the landlord a paid bill from an appropriate tradesman or supplier unrelated to the tenant, the tenant may deduct from his or her rent the amount of the bill, not to exceed the limits specified by this Section and not to exceed the reasonable price then customarily charged for the repair. If not clearly indicated on the bill submitted by the tenant, the tenant shall also provide to the landlord in writing, at the time of the submission of the bill, the name, address, and telephone number for the tradesman or supplier that provided the repair services. A tenant may not repair at the landlord's expense if the condition was caused by the deliberate or negligent act or omission of the tenant, a member of the tenant's family, or another person on the premises with the tenant's consent.
765 ILCS 742/5