New York Laws
Article 7-C - Special Proceedings by Tenants of Dwellings for Judgment Directing Deposit of Rents and the Use Thereof for the Purpose of Remedying Conditions Dangerous to Life, Health or Safety
796-G - Defenses.

ยง 796-g. Defenses. It shall be a sufficient defense to the proceeding,
if the owner or any mortgagee or lienor of record establish that:

1. The condition or conditions alleged in the petition did not in fact
exist or that such condition or conditions have been removed or
remedied; or

2. Such condition or conditions have been caused by a petitioning
tenant or tenants or members of the family or families of such
petitioner or petitioners or of their guests or by other residents of
the dwelling or their families or guests; or

3. Any tenant or resident of the dwelling has refused entry to the
owner or the owner's agent to a portion of the premises for the purpose
of correcting such condition or conditions.