Problem with rpi-gpio

The problem is, that i cant control my GPIO ports. I added this basic example :
switch:

  • platform: rpi_gpio
    ports:
    11: Fan Office
    12: Light Desk

to my .yaml file and then I restart the homeassistant. I received the error "Invalid config. The following components and platforms could not be set up: rpi-gpio, switch:rpi_gpio

It also doesn’t work with binary_sensor and so on…
I searched a lot and found this guy with the same issue: https://github.com/home-assistant/home-assistant/issues/15476
But there is no awnser too.

Greetings,
David

Try indenting the section under ports:

switch:
   - platform: rpi_gpio
     ports:
       11: Fan Office
       12: Light Desk

just the forum format. It’s in the file like this:
Unbenannt

You need to follow the instructions at the top of the screen to post code.

That would make it so much easier to see that your line 72 is intended 3 spaces instead of just 2 - and that the error continues though to line 76.