From 885aae317b1ae0c60a1f60a72617a22dd8449ba4 Mon Sep 17 00:00:00 2001 From: Klaas Schoute Date: Wed, 17 Oct 2018 09:35:09 +0200 Subject: [PATCH] Update Raspihats component configuration variable (#6852) * Update Raspihats component configuration variable * Update Raspihats component configuration variable * Minor changes * Minor changes * Fix * Test for build error * Re-add initial_state * Test it again * Remove key * Remove key --- .../binary_sensor.raspihats.markdown | 48 ++++++++++++++---- source/_components/switch.raspihats.markdown | 49 ++++++++++++++----- 2 files changed, 76 insertions(+), 21 deletions(-) diff --git a/source/_components/binary_sensor.raspihats.markdown b/source/_components/binary_sensor.raspihats.markdown index be5891b19be..05d4b5cbac8 100644 --- a/source/_components/binary_sensor.raspihats.markdown +++ b/source/_components/binary_sensor.raspihats.markdown @@ -35,16 +35,44 @@ binary_sensor: name: PIR Bedroom ``` -Configuration variables: - -- **i2c_hats** (*Optional*): Array of used I2C-HATs. - - **board** (*Required*): The board name [Di16, Di6Rly6, DI16ac, DI6acDQ6rly]. - - **address** (*Required*): The board I2C address, hex value. - - **channels** (*Required*): Array of used digital input channels. - - **index** (*Required*): Digital input channel index. - - **name** (*Required*): Friendly name to use for the frontend. - - **invert_logic** (*Optional*): Inverts the input logic, default is `false`. - - **device_class** (*Optional*): See device classes in [binary_sensor component](/components/binary_sensor/), default is `None` +{% configuration %} +i2c_hats: + description: An array of used I2C-HATs. + required: false + type: list + keys: + board: + description: The board name either Di16, Di6Rly6, DI16ac or DI6acDQ6rly. + required: true + type: string + address: + description: The board I2C address as HEX value. + required: true + type: string + channels: + description: Array of used digital input channels. + required: true + type: list + keys: + index: + description: Digital input channel index. + required: true + type: integer + name: + description: Friendly name to use for the frontend. + required: true + type: string + invert_logic: + description: Inverts the input logic. + required: false + default: false + type: boolean + device_class: + description: See device classes in [binary_sensor component](/components/binary_sensor/). + required: false + default: "None" + type: string +{% endconfiguration %} ## {% linkable_title Directions for installing smbus support on Raspberry Pi %} diff --git a/source/_components/switch.raspihats.markdown b/source/_components/switch.raspihats.markdown index c1f65847dc3..37f31ad59a4 100644 --- a/source/_components/switch.raspihats.markdown +++ b/source/_components/switch.raspihats.markdown @@ -36,17 +36,44 @@ switch: name: Light Office ``` -Configuration variables: - -- **i2c_hats** (*Optional*): Array of used I2C-HATs. - - **board** (*Required*): The board name. - - **address** (*Required*): The board I2C address, hex value. - - **channels** (*Required*): Array of used digital output channels. - - **index** (*Required*): Digital output channel index. - - **name** (*Required*): Friendly name to use for the frontend. - - **invert_logic** (*Optional*): Inverts the output logic, default is `False`. - - **initial_state** (*Optional*): Initial state, default is `None`, can also be `True` or `False`. `None` means no state is forced on the corresponding digital output when this switch is instantiated. - +{% configuration %} +i2c_hats: + description: An array of used I2C-HATs. + required: false + type: list + keys: + board: + description: The board name. + required: true + type: string + address: + description: The board I2C address as HEX value. + required: true + type: string + channels: + description: An array of used digital input channels. + required: true + type: list + keys: + index: + description: The digital input channel index. + required: true + type: integer + name: + description: The friendly name to use for the frontend. + required: true + type: string + invert_logic: + description: Inverts the input logic. + required: false + default: false + type: boolean + initial_state: + description: "The initial state, can be either `true` or `false`. `none` means no state is forced on the corresponding digital output when this switch is instantiated." + required: false + default: None + type: boolean +{% endconfiguration %} ## {% linkable_title Directions for installing smbus support on Raspberry Pi %}