There is almost no way you can handover
any HomeAssistant installation during a home sale, not unless you want the buyer to be calling you for help with technical issues/gremlins
months after the sale closes. Every single Home Assistant installation is effectively a custom install - there can be almost zero commonality between two different setups really. Things break because you don't update them; they break because you do update them. It's a small but constant stream of maintenance tasks once your HA installation reaches a certain degree of complexity and new owner is likely not going to be interested in that at all?
For me and my own HA install, I accept I will have to revert everything to how it was when I bought the home, which is itself a really tragic statement on the state of home automation in 2022. I get satisfaction from running it, but it does require running. It is not an "appliance", and there are still no real building codes/standards for ensuring these things stay compatible for years to come.
Similarly, if the seller tried to convince me to take a house with their own home made HomeAssistant setup, I would likely request it be removed completely before I closed the sale, regardless of any perceived quality of the work. If nothing else, I couldn't trust they hadn't left their own remote access ability somewhere in the stack and I don't have time to audit what might be years of quite hacky integration work.
There is an old saying, "Never sell a car to a friend". Home assistant is like that, but you should never sell it to anyone, regardless of how good you think you've got it running today.