(a) If the court as a matter of law finds a rental agreement or any clause of a rental agreement to have been unconscionable at the time it was made, the court may refuse to enforce the rental agreement, or it may enforce the remainder of the rental agreement without the unconscionable clause, or it may so limit the application of any unconscionable clause as to avoid any unconscionable result.
(b) With respect to a consumer rental agreement, if the court as a matter of law finds that a rental agreement or any clause of a rental agreement has been induced by unconscionable conduct or that unconscionable conduct has occurred in the collection of a claim arising from a rental agreement, the court may grant appropriate relief.
(c) Before making a finding of unconscionability under subsection (a) or (b) of this section, the court, on its own motion or that of a party, shall afford the parties a reasonable opportunity to present evidence as to the setting, purpose and effect of the rental agreement or clause thereof, or of the conduct.
(d) In an action in which the consumer claims unconscionability with respect to a rental agreement:
(1) If the court finds unconscionability under subsection (a) or (b) of this section, the court shall award reasonable attorney's fees to the consumer.
(2) If the court does not find unconscionability and the consumer claiming unconscionability has brought or maintained an action he or she knew to be groundless, the court shall award reasonable attorney's fees to the dealer against whom the claim is made.
(3) In determining attorney's fees, the amount of the recovery on behalf of the claimant under subsections (a) and (b) of this section is not controlling.