If you think the documentation needs to be improved here is how to improve it…
Keep in mind that the page tells you how to setup that component, not everything about Home Assistant.
Formatting is very important for yaml so ensure that your spacing is correct.
switch:
- platform: rpi_gpio
ports:
11: Fan Office
12: Light Desk
If you followed that guide and have things wired correctly you should be controlling your GPIO now. Keep in mind the Port number is the pin number not that GPIO number.
The switches should automatically show up on the front end (unless you have messed with your default view already)
If something isn’t showing up check your error log and post up what is showing up for further help.