Rental property or home?

I put my main home on the market  (after owning it for 9 years as a main property) and it didn't sell.  Instead, in January 2019, I rented it out for 6 months.  At which point in July 2019 the renters moved out and I sold it to another family.

Should I count this as a sale of a rental property, or sale of a main home?