From 920549e7e88da5a6ab7d68f928e29fe345d097f8 Mon Sep 17 00:00:00 2001 From: Jorim Tielemans Date: Mon, 22 Oct 2018 23:29:17 +0200 Subject: [PATCH] Update Raspberry Pi GPIO Binary Sensor configuration (#6999) * Update Raspberry Pi GPIO Binary Sensor configuration * Update binary_sensor.rpi_gpio.markdown * Update binary_sensor.rpi_gpio.markdown * Minor change --- .../binary_sensor.rpi_gpio.markdown | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/source/_components/binary_sensor.rpi_gpio.markdown b/source/_components/binary_sensor.rpi_gpio.markdown index 5b95daed1ca..8494c3af37c 100644 --- a/source/_components/binary_sensor.rpi_gpio.markdown +++ b/source/_components/binary_sensor.rpi_gpio.markdown @@ -28,13 +28,33 @@ binary_sensor: 12: PIR Bedroom ``` -Configuration variables: - -- **ports** array (*Required*): Array of used ports. - - **port: name** (*Required*): Port numbers (BCM mode pin numbers) and corresponding names. -- **pull_mode** (*Optional*): The internal pull to use (UP or DOWN). Default is UP. -- **bouncetime** (*Optional*): The time in milliseconds for port debouncing. Default is 50ms. -- **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is false (ACTIVE HIGH). +{% configuration %} +ports: + description: List of used ports. + required: true + type: map + keys: + "port: name": + description: The port numbers (BCM mode pin numbers) and corresponding names. + required: true + type: string +bouncetime: + description: The time in milliseconds for port debouncing. + required: false + type: integer + default: 50 +invert_logic: + description: If `true`, inverts the output logic to ACTIVE LOW. + required: false + type: boolean + default: "`false` (ACTIVE HIGH)" +pull_mode: + description: > + Type of internal pull resistor to use. + Options are `UP` - pull-up resistor and `DOWN` - pull-down resistor. + required: false + type: string + default: "`UP`" +{% endconfiguration %} For more details about the GPIO layout, visit the Wikipedia [article](https://en.wikipedia.org/wiki/Raspberry_Pi#GPIO_connector) about the Raspberry Pi. -