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
This commit is contained in:
Klaas Schoute 2018-10-17 09:35:09 +02:00 committed by Fabian Affolter
parent 4d038bfa73
commit 885aae317b
2 changed files with 76 additions and 21 deletions

View File

@ -35,16 +35,44 @@ binary_sensor:
name: PIR Bedroom name: PIR Bedroom
``` ```
Configuration variables: {% configuration %}
i2c_hats:
- **i2c_hats** (*Optional*): Array of used I2C-HATs. description: An array of used I2C-HATs.
- **board** (*Required*): The board name [Di16, Di6Rly6, DI16ac, DI6acDQ6rly]. required: false
- **address** (*Required*): The board I2C address, hex value. type: list
- **channels** (*Required*): Array of used digital input channels. keys:
- **index** (*Required*): Digital input channel index. board:
- **name** (*Required*): Friendly name to use for the frontend. description: The board name either Di16, Di6Rly6, DI16ac or DI6acDQ6rly.
- **invert_logic** (*Optional*): Inverts the input logic, default is `false`. required: true
- **device_class** (*Optional*): See device classes in [binary_sensor component](/components/binary_sensor/), default is `None` 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 %} ## {% linkable_title Directions for installing smbus support on Raspberry Pi %}

View File

@ -36,17 +36,44 @@ switch:
name: Light Office name: Light Office
``` ```
Configuration variables: {% configuration %}
i2c_hats:
- **i2c_hats** (*Optional*): Array of used I2C-HATs. description: An array of used I2C-HATs.
- **board** (*Required*): The board name. required: false
- **address** (*Required*): The board I2C address, hex value. type: list
- **channels** (*Required*): Array of used digital output channels. keys:
- **index** (*Required*): Digital output channel index. board:
- **name** (*Required*): Friendly name to use for the frontend. description: The board name.
- **invert_logic** (*Optional*): Inverts the output logic, default is `False`. required: true
- **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. 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 %} ## {% linkable_title Directions for installing smbus support on Raspberry Pi %}