Skip to content

Commit 653b4ba

Browse files
tabakhaseballoob
authored andcommitted
clearify rpi_gpio sharing + revert home-assistant#4608 (home-assistant#4660)
* Revert "add documentation for "shared_gpio" flag to component switch.rpi_gpio" This reverts commit f2dba1f. * clearify that rpi_gpio pins are exclusive to HASS-ussage when assigned
1 parent 97c3b41 commit 653b4ba

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

source/_components/switch.rpi_gpio.markdown

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ Configuration variables:
3232
- **ports** array (*Required*): Array of used ports.
3333
- **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).
35-
- **shared_gpio** (*Optional*): If true, forces a GPIO.setup() before each write. Default is false.
3635
3736
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.
3837
38+
<p class='note warning'>
39+
Note that a pin managed by HASS is expected to be exclusive to HASS.
40+
</p>
41+
3942
A common question is what does Port refer to, this number is the actual GPIO # not the pin #.
4043
For example, if you have a relay connected to pin 11 its GPIO # is 17.
4144
@@ -47,14 +50,4 @@ switch:
4750
17: Speaker Relay
4851
```
4952
50-
In case you have any other python scripts running that use RPi.GPIO no values will be written after the initial HASS-start.
51-
Setting **shared_gpio** to true will reinit the pin before each write, working around this issue.
52-
```yaml
53-
# Example configuration.yaml entry
54-
switch:
55-
- platform: rpi_gpio
56-
shared_gpio: true
57-
ports:
58-
19: LED-Red
59-
```
6053

0 commit comments

Comments
 (0)