(1) If the court, as a matter of law, finds that a rental agreement or any provision thereof was unconscionable when made, the court may refuse to enforce the agreement, enforce the remainder of the agreement without the unconscionable provision, or limit the application of any unconscionable provision to avoid an unconscionable result.
(2) If unconscionability is put into issue by a party or by the court upon its own motion the parties shall be afforded a reasonable opportunity to present evidence as to the setting, purpose, and effect of the rental agreement or settlement to aid the court in making the determination.