Except to the extent provided in the condominium instruments, declaration, or rules and regulations duly adopted pursuant thereto, no community association shall enact any provisions restricting solar power or as provided in subsection D, any restrictive covenant included in an instrument affecting the title to real or leasehold property, that restricts the installation or use of any solar energy collection device on units or lots that are part of the development real property in the Commonwealth is declared to be void and contrary to the public policy of the Commonwealth . … The A community association may prohibit or restrict shall not enforce any provision of a restrictive covenant that became effective on or after July 1, 2008, that restricts the installation and use of such solar energy collection devices on the common elements or common areas of real estate that the community association owns or has under its care, custody, or control .