It depends. If you have been treating the lease as a monthly rental expense for the rental, then you can deduct the amount you paid as a rental expense. However, if you now own the solar property, then the cost should be set up as an asset for the rental property and subject to depreciation.
See here for more information from TurboTax about rental property depreciation.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"