No, if you don't make any profit on the rent, the income is not liable to tax. If, however, you charge a higher rent or provide substantial services (e.g. cleaning, breakfast, etc.) for a fee, you must declare the earnings as additional income on your tax return.
The regulations concerning an obligation to register a sub-tenant vary from canton to canton. In many cantons, you are obliged to inform the residents' registration office when your sub-tenant moves in or out (the 'Drittmeldepflicht' or third-party notification obligation – see graphic). Even if you are not obliged to do so, it is prudent to recommend that your sub-tenant register with the municipality. The municipality will inform your sub-tenant whether or not they need to register personally.
We also recommend registering correctly with regard to the visitor's tax (see below).
You can register your sub-tenants directly online here (in german): Online registration
If your sub-tenant is registered with the municipality, you do not have to pay a tourist tax, overnight stay fee, guest tax, etc. The same applies if your sub-tenant has registered with the municipality as a weekly or short-term resident. These regulations vary by municipality, but in principle are generally the same.
No responsibility is taken for the correctness of this information.