From 834ca3a007bcecb759688b1bc48412af78fc257c Mon Sep 17 00:00:00 2001 From: Emeric Date: Mon, 8 Oct 2018 20:28:00 +0200 Subject: [PATCH] Update BeagleBone configuration variables (#6608) * Update BeagleBone config variables * Fixed wrong type * change type for pin_name --- .../binary_sensor.bbb_gpio.markdown | 40 ++++++++++++++----- source/_components/switch.bbb_gpio.markdown | 36 ++++++++++++----- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/source/_components/binary_sensor.bbb_gpio.markdown b/source/_components/binary_sensor.bbb_gpio.markdown index f35f488a7ea..66e4c98f4fa 100644 --- a/source/_components/binary_sensor.bbb_gpio.markdown +++ b/source/_components/binary_sensor.bbb_gpio.markdown @@ -30,14 +30,36 @@ binary_sensor: name: Window ``` -Configuration variables: - -- **pins** array (*Required*): Array of used pins. - - **pin_name** (*Required*): Pin numbers and corresponding names. - - **name** (*Required*): Friendly name to use for the frontend. - - **bouncetime** (*Optional*): Debounce time for reading input pin defined in milliseconds [ms]. Defaults to `50 ms`. - - **invert_logic** (*Optional*): If `true`, inverts the input logic to ACTIVE LOW. Default is `false` (ACTIVE HIGH). - - **pull_mode** (*Optional*): Type of internal pull resistor connected to input. Options are `UP` - pull-up resistor and `DOWN` - pull-down resistor. Defaults to `UP`. +{% configuration %} +pins: + description: List of used pins. + required: true + type: map + keys: + pin_name: + description: Port numbers and corresponding names. + required: true + type: map + keys: + name: + description: Friendly name to use for the frontend. + required: true + type: string + bouncetime: + description: Debounce time for reading input pin defined in milliseconds [ms]. + required: false + default: 50 + type: integer + invert_logic: + description: If `true`, inverts the input logic to ACTIVE LOW + required: false + default: false + type: boolean + pull_mode: + description: Type of internal pull resistor connected to input. Options are `UP` - pull-up resistor and `DOWN` - pull-down resistor. + required: false + default: UP + type: string +{% endconfiguration %} For more details about the GPIO layout, visit the [article](http://elinux.org/Beagleboard:BeagleBoneBlack) about the BeagleBone Black. - diff --git a/source/_components/switch.bbb_gpio.markdown b/source/_components/switch.bbb_gpio.markdown index fc41a25db14..6efd8f88159 100644 --- a/source/_components/switch.bbb_gpio.markdown +++ b/source/_components/switch.bbb_gpio.markdown @@ -17,7 +17,7 @@ The `bbb_gpio` switch platform allows you to control the GPIOs of your [BeagleBo ## {% linkable_title Configuration %} -To use yourBeagleBone Black's GPIO in your installation, add the following to your `configuration.yaml` file: +To use your BeagleBone Black's GPIO in your installation, add the following to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry @@ -30,13 +30,31 @@ switch: name: LED Green ``` -Configuration variables: - -- **pins** array (*Required*): Array of used ports. - - **pin_name** (*Required*): Port numbers and corresponding names. - - **name** (*Optional*): Friendly name to use for the frontend. - - **initial** (*Optional*): Initial state of the pin. Defaults to `False`. - - **invert_logic** (*Optional*): If true, inverts the output logic to ACTIVE LOW. Default is `false` (ACTIVE HIGH). +{% configuration %} +pins: + description: List of used pins. + required: true + type: map + keys: + pin_name: + description: Port numbers and corresponding names. + required: true + type: map + keys: + name: + description: Friendly name to use for the frontend. + required: false + type: string + initial: + description: Initial state of the pin. + required: false + default: false + type: boolean + invert_logic: + description: If `true`, inverts the input logic to ACTIVE LOW + required: false + default: false + type: boolean +{% endconfiguration %} For more details about the GPIO layout, visit the [article](http://elinux.org/Beagleboard:BeagleBoneBlack) about the BeagleBone Black. -