mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-06-22 10:06:49 +00:00
add documentation for "shared_gpio" flag to component switch.rpi_gpio
This commit is contained in:
parent
d5404ed82e
commit
f2dba1f614
@ -32,6 +32,7 @@ Configuration variables:
|
||||
- **ports** array (*Required*): Array of used ports.
|
||||
- **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).
|
||||
- **shared_gpio** (*Optional*): If true, forces a GPIO.setup() before each write. Default is false.
|
||||
|
||||
For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi.
|
||||
|
||||
@ -46,4 +47,14 @@ switch:
|
||||
17: Speaker Relay
|
||||
```
|
||||
|
||||
In case you have any other python scripts running that use RPi.GPIO no values will be written after the initial HASS-start.
|
||||
Setting **shared_gpio** to true will reinit the pin before each write, working around this issue.
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
switch:
|
||||
- platform: rpi_gpio
|
||||
shared_gpio: true
|
||||
ports:
|
||||
19: LED-Red
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user