Skip to content

Commit 8c6bd97

Browse files
dmschlabfabaff
authored andcommitted
Update switch.rpi_gpio.markdown (home-assistant#3662)
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.
1 parent f835619 commit 8c6bd97

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

source/_components/switch.rpi_gpio.markdown

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,20 @@ switch:
3030
Configuration variables:
3131
3232
- **ports** array (*Required*): Array of used ports.
33-
- **port: name** (*Required*): Port numbers and corresponding names.
33+
- **port: name** (*Required*): Port numbers and corresponding names (GPIO #).
3434
- **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH).
3535
3636
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.
3737
38+
A common question is what does Port refer to, this number is the actual GPIO # not the pin #.
39+
For example, if you have a relay connected to pin 11 its GPIO # is 17.
40+
41+
```yaml
42+
# Example configuration.yaml entry
43+
switch:
44+
- platform: rpi_gpio
45+
ports:
46+
17: Speaker Relay
47+
```
48+
49+

0 commit comments

Comments
 (0)