"In 2020, legal changes were applied in the Swiss Criminal Code (StGB) and in the Military Criminal Code (MStG). Federal Constitution of the Swiss Confederation: It is open for interpretation whether "lifestyle" ("Lebensform") includes sexual orientation. "Sexual orientation" or "gender identity" are nonetheless not metioned in the Constitution."
LGBT discrimination: Illegal in some contexts from Jul 1, 2020 to (none).
Discrimination is only illegal for sexual orientation and not gender identity.