Skip to content

Commit

Permalink
Update switch.rpi_gpio.markdown (home-assistant#3662)
Browse files Browse the repository at this point in the history
I found the current documentation confusing as it did not clearly state whether the code is look at the pin # or GPIO #. Looking on the forums others were having the same issue. My goal is to make it clear that GPIO # is what users should be entering into their configs.
  • Loading branch information
dmschlab authored and fabaff committed Oct 21, 2017
1 parent dc9e362 commit fbfad8c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion source/_components/switch.rpi_gpio.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,20 @@ switch:
Configuration variables:
- **ports** array (*Required*): Array of used ports.
- **port: name** (*Required*): Port numbers and corresponding names.
- **port: name** (*Required*): Port numbers and corresponding names (GPIO #).
- **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH).
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.
A common question is what does Port refer to, this number is the actual GPIO # not the pin #.
For example, if you have a relay connected to pin 11 its GPIO # is 17.
```yaml
# Example configuration.yaml entry
switch:
- platform: rpi_gpio
ports:
17: Speaker Relay
```

0 comments on commit fbfad8c

Please sign in to comment.