The fiscal allowances for those that purchased their ´habitual home´/ Vivienda Habital before 2013 forms one of the biggest and most widespread perks amongst tax payers in Spain.
To be able to make use of this fiscal benefit you must occupy the property as your habitual home for at least three consecutive years. Renting it out for even a couple of weeks in a year will result in that you do not meet the specific requisite for tax allowance. You can however re-qualify if you go back to living in your property permanently and continuously and intend to do so for the following three years.
You cannot repeat this indefinitely however. Doing so would mean you would not meet the three year requisite and risk having to reimburse any tax benefits you have received in previous years, the amount to include interest, in the tax year that you fail to qualify.
According to Hacienda, (tax office) you will continue to be allowed to benefit from the allowances on your income tax declaration if you only rent out part of your home. The deductions would have to be calculated pro rata on the part of the property still occupied by the owner(s).