Yes but one thing is tax on the profits ie income tax, which goes to the central government ( Madrid ) and another is the tourist tax which goes to the local one, except for the IVA which is charged on top of this, which also goes to Madrid.
Madrid is extremely keen to get their hands on this money, more so than the local one, and have more information at their disposal to make sure they get it.
Having said this legal rentals properties are able to, and most do, pay a fixed sum every 3 months which more or less covers the tourist tax they would have to pay if accounted for person per person this eliminating paperwork for both parties.
Regarding communities and as you probably know it was previously not possible to legally rent a flat in an apartment building. This has now changed.
If the building is in an area that the local council has determined that renting properties to tourists is acceptable ( not all of them will be ) the majority of the owners must give their permission first. I suspect that in a lot of cases they won't.
The apartments must also be disabled persons friendly ie no steps and have a lift, etc.
After all this has been complied with they then have to purchase a permit from a limited kitty, which means not everyone will get one.
This is the idea. It still hasn't been approved by the local government who are currently more involved in sorting out the squabbles between the 3 parties in charge of administrating out present and future wellbeing.
Worried ? Me ?