Fix samples, add title and other changes (#3828)
This commit is contained in:
parent
9faef559b6
commit
f91615cbb6
7 changed files with 106 additions and 117 deletions
|
@ -18,43 +18,49 @@ The `knx` sensor platform allows you to monitor [KNX](http://www.knx.org) binary
|
|||
The `knx` component must be configured correctly, see [KNX Component](/components/knx).
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: knx
|
||||
name: "Entrance.Motion.Sensor"
|
||||
address: '6/0/2'
|
||||
device_class: 'motion'
|
||||
#significant_bit: 2
|
||||
- platform: knx
|
||||
name: "Entrance.Motion.Sensor"
|
||||
address: '6/0/2'
|
||||
device_class: 'motion'
|
||||
#significant_bit: 2
|
||||
```
|
||||
|
||||
* **name** (*Optional*): A name for this device used within Home Assistant.
|
||||
* **address**: KNX group address of the binary sensor
|
||||
* **device_class**: (Optional) HASS device class e.g. "motion"
|
||||
* **significant_bit**: (Optional) Specify which significant bit of the KNX value should be used. Default is 1.
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Optional*): A name for this device used within Home Assistant.
|
||||
- **address**: KNX group address of the binary sensor.
|
||||
- **device_class** (Optional): HASS device class e.g. "motion".
|
||||
- **significant_bit** (Optional): Specify which significant bit of the KNX value should be used. Default is 1.
|
||||
|
||||
You can also attach actions to binary sensors (e.g., to switch on a light when a switch was pressed). In this example, one light is switched on when the button was pressed once and two others when the button was pressed a second time.
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: knx
|
||||
name: Livingroom.3Switch3
|
||||
address: '5/0/26'
|
||||
automation:
|
||||
- counter: 1
|
||||
hook: 'on'
|
||||
action:
|
||||
- entity_id: light.hue_color_lamp_1
|
||||
service: homeassistant.turn_on
|
||||
- counter: 2
|
||||
hook: 'on'
|
||||
action:
|
||||
- entity_id: light.hue_bloom_1
|
||||
service: homeassistant.turn_on
|
||||
- entity_id: light.hue_bloom_2
|
||||
service: homeassistant.turn_on
|
||||
- platform: knx
|
||||
name: Livingroom.3Switch3
|
||||
address: '5/0/26'
|
||||
automation:
|
||||
- counter: 1
|
||||
hook: 'on'
|
||||
action:
|
||||
- entity_id: light.hue_color_lamp_1
|
||||
service: homeassistant.turn_on
|
||||
- counter: 2
|
||||
hook: 'on'
|
||||
action:
|
||||
- entity_id: light.hue_bloom_1
|
||||
service: homeassistant.turn_on
|
||||
- entity_id: light.hue_bloom_2
|
||||
service: homeassistant.turn_on
|
||||
```
|
||||
|
||||
- **name** (*Optional*): A name for this device used within Home Assistant.
|
||||
- **counter**: (*Optional*) Set to 2 if your only want the action to be executed if the button was pressed twice. To 3 for three times button pressed. Defaults to 1.
|
||||
- **hook**: (Optional): Indicates if the automation should be executed on what state of the binary sensor. Values: "on" or "off". Defaults to "on".
|
||||
- **action**: Specify a list of actions analog to the [HASS automation rules](https://home-assistant.io/docs/automation/action/).
|
||||
Configuration variables:
|
||||
|
||||
- **name** (*Optional*): A name for this device used within Home Assistant.
|
||||
- **counter** (*Optional*): Set to 2 if your only want the action to be executed if the button was pressed twice. To 3 for three times button pressed. Defaults to 1.
|
||||
- **hook** (Optional): Indicates if the automation should be executed on what state of the binary sensor. Values: "on" or "off". Defaults to "on".
|
||||
- **action**: Specify a list of actions analog to the [automation rules](/docs/automation/action/).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue