If you live in Spain for less than six months (183 days) within a calendar year, your status is a non-resident and therefore will only be taxed on the income earned in Spain. Your income is taxed at a flat rate with no allowances or deductions. If you are a non-resident and own a property in Spain, you must submit a tax return and pay Spanish property taxes for non-residents as well as the local Spanish property taxes (IBIS).
Essential Properties can assist you with your non residence tax return.