Deductions & credits

Thank you, KrisD15.  One question with respect to your answer. If you sell your house, why not to consider solar panels and batteries as a part of the structure? It makes sense because it is sold together with the house and increases the value of the house. That way it will be possible to claim the profit from the house sale as capital gain. Does make sense?