Minimizing of the configuration sample (#1008)

This commit is contained in:
Fabian Affolter 2016-09-30 20:48:56 +02:00 committed by GitHub
parent a09ede5b63
commit de7c1d5ac9
22 changed files with 143 additions and 127 deletions

View File

@ -10,6 +10,7 @@ footer: true
logo: apcupsd.png
ha_category: Binary Sensor
ha_release: 0.13
ha_iot_class: "Local Polling"
---
In addition to the [APCUPSd Sensor](/components/sensor.apcupsd/) devices, you may also create a device which is simply "on" when the UPS status is online and "off" at all other times.
@ -20,10 +21,8 @@ To enable this sensor, you first have to set up [apcupsd](/components/apcupsd/),
# Example configuration.yaml entry
binary_sensor:
- platform: apcupsd
name: UPS Online
```
Configuration variables:
- **name** (*Optional*): Name to use in the front end.

View File

@ -21,25 +21,35 @@ To use your aREST binary sensor in your installation, add the following to your
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: arest
- platform: arest
resource: http://IP_ADDRESS
name: Office Switch
pin: 8
```
Configuration variables:
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
- **pin** (*Required*): Number of the pin to monitor.
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
Accessing the URL http://IP_ADDRESS/digital/PIN_NUMBER should give you the state of the pin inside a JSON response as `return_value`.
```bash
$ curl -X GET http://10.100.0.157/digital/9
$ curl -X GET http://192.168.0.5/digital/9
{"return_value": 0, "id": "office1", "name": "Office", "connected": true}
```
An example for Pin 9 inspired by the command above could look like this:
```yaml
# Example configuration.yaml entry
binary_sensor:
- platform: arest
resource: http://192.168.0.5/digital/9
pin: 9
name: Office
```
<p class='note'>
This sensor is not suitable for fast state changes because there is a high possibility that the change took place between two update cycle.
</p>

View File

@ -21,13 +21,8 @@ To use your Command binary sensor in your installation, add the following to you
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: command_line
- platform: command_line
command: cat /proc/sys/net/ipv4/ip_forward
name: 'IP4 forwarding'
sensor_class: opening
payload_on: "1"
payload_off: "0"
value_template: '{% raw %}{{ value.x }}{% endraw %}'
```
Configuration variables:
@ -50,9 +45,10 @@ Check the state of an [SickRage](https://github.com/sickragetv/sickrage) instanc
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: command_line
- platform: command_line
command: netstat -na | find "33322" | find /c "LISTENING" > nul && (echo "Running") || (echo "Not running")
name: 'sickragerunning'
sensor_class: moving
payload_on: "Running"
payload_off: "Not running"
```
@ -63,9 +59,10 @@ Check if [RasPlex](http://www.rasplex.com/) is `online`.
```yaml
binary_sensor:
platform: command_line
- platform: command_line
command: 'ping -c 1 rasplex.local | grep "1 received" | wc -l'
name: 'is_rasplex_online'
sensor_class: connectivity
payload_on: 1
payload_off: 0
```
@ -77,6 +74,7 @@ binary_sensor:
platform: command_line
name: Printer
command: ping -c 1 192.168.1.10 &> /dev/null && echo success || echo fail
sensor_class: connectivity
payload_on: "success"
payload_off: "fail"
```

View File

@ -9,6 +9,8 @@ sharing: true
footer: true
logo: ecobee.png
ha_category: Sensor
ha_release: 0.9
ha_iot_class: "Local Push"
---
To get your Ecobee binary sensors working with Home Assistant, follow the instructions for the general [Ecobee component](/components/ecobee/).

View File

@ -13,8 +13,7 @@ ha_release: 0.21
ha_iot_class: "Local Push"
---
This can typically be one of those batteryless wall switches. Currently only one type has been tested: Eltako FT55. Other devices will most likely not work without changing the Home-Asisstant code.
This can typically be one of those batteryless wall switches. Currently only one type has been tested: Eltako FT55. Other devices will most likely not work without changing the Home Asisstant code.
To use your EnOcean device, you first have to set up your [EnOcean hub](/components/enocean/) and then add the following to your `configuration.yaml` file:
@ -23,8 +22,6 @@ To use your EnOcean device, you first have to set up your [EnOcean hub](/compone
binary_sensor:
- platform: enocean
id: [0x01,0x90,0x84,0x3C]
name: Door
sensor_class: opening
```
Configuration variables:

View File

@ -25,11 +25,6 @@ To enable your FFmpeg with noise detection in your installation, add the followi
binary_sensor:
- platform: ffmpeg
tool: noise
input: FFMPEG_SUPPORTED_INPUT
name: FFmpeg Noise
peak: -30
duration: 1
reset: 20
```
Configuration variables:
@ -61,13 +56,6 @@ binary_sensor:
- platform: ffmpeg
tool: motion
input: FFMPEG_SUPPORTED_INPUT
name: FFmpeg Motion
changes: 10
reset: 20
# group feature / default not in use
repeat: 0
repeat_time: 0
```
Configuration variables:

View File

@ -10,6 +10,7 @@ footer: true
logo: universal_devices.png
ha_category: Binary Sensor
ha_iot_class: "Local Push"
ha_release: pre 0.7
---
The `isy994` platform allows you to get data from your [ISY994](https://www.universal-devices.com/residential/isy994i-series/) binary sensors from within Home Assistant.

View File

@ -9,11 +9,11 @@ sharing: true
footer: true
---
Binary sensors are gathering information about state of switches, contacts, pins, and alike. The return value of those sensors is usually digital (1/0). This means that those sensors knows only two states: **off/low/open** and **on/high/closed**.
Binary sensors are gathering information about state of switches, contacts, pins, and alike. The return value of those sensors is usually digital (1/0). This means that those sensors knows only two states: **0/off/low/open/false** and **1/on/high/closed/true**.
Knowing that there are only two states allows Home Assistant to represent the sensor better in the frontend.
Most binary sensors support the `SENSOR_CLASSES` which let you specify the type of your sensor. The following types are supported:
Most binary sensors support the `sensor_class:` which let you specify the type of your sensor. The following types are supported:
- **None**: Generic on/off
- **cold**: On means cold (or too cold)

View File

@ -10,6 +10,7 @@ footer: true
logo: modbus.png
ha_category: Binary Sensor
ha_release: 0.28
ha_iot_class: "Local Push"
---
The `modbus` binary sensor allows you to gather data from [Modbus](http://www.modbus.org/) coils.
@ -19,7 +20,7 @@ To use your Modbus binary sensors in your installation, add the following to you
```yaml
# Example configuration.yml entry
binary_sensor:
platform: modbus
- platform: modbus
coils:
- name: Sensor1
slave: 1

View File

@ -10,6 +10,7 @@ footer: true
logo: mqtt.png
ha_category: Binary Sensor
ha_release: 0.9
ha_iot_class: "Depends"
---
@ -20,14 +21,8 @@ To use your MQTT binary sensor in your installation, add the following to your `
```yaml
# Example configuration.yml entry
binary_sensor:
platform: mqtt
- platform: mqtt
state_topic: "home-assistant/window/contact"
name: "MQTT Sensor"
qos: 0
payload_on: "ON"
payload_off: "OFF"
sensor_class: opening
value_template: '{% raw %}{{ value.x }}{% endraw %}'
```
Configuration variables:
@ -40,9 +35,24 @@ Configuration variables:
- **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually:
For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of a sensor manually:
```bash
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/window/contact -m "OFF"
```
An extended configuration for the same sensor could look like this if you want/need to be more specific.
```yaml
# Example configuration.yml entry
binary_sensor:
platform: mqtt
state_topic: "home-assistant/window/contact"
name: "Windows contact"
qos: 0
payload_on: "1"
payload_off: "0"
sensor_class: opening
value_template: '{% raw %}{{ value.x }}{% endraw %}'
```

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
logo: nest_thermostat.png
ha_category: Binary Sensor
ha_release: pre 0.7
---
@ -22,12 +23,11 @@ To set it up, add the following information to your `configuration.yaml` file:
```yaml
binary_sensor:
platform: nest
scan_interval: 60
- platform: nest
monitored_conditions:
- 'fan'
- 'hvac_ac_state'
- 'hvac_heater_state'
'hvac_heater_state'
- 'hvac_aux_heater_state'
- 'hvac_heat_x2_state'
- 'hvac_heat_x3_state'
@ -39,7 +39,6 @@ binary_sensor:
Configuration variables:
- **scan_interval** (*Optional*): Interval in seconds to scan.
- **monitored_conditions** array (*Required*): States to monitor.
- 'fan'
- 'hvac_ac_state'
@ -50,4 +49,5 @@ Configuration variables:
- 'hvac_alt_heat_x2_state'
- 'hvac_emer_heat_state'
- 'online'
- **scan_interval** (*Optional*): Interval in seconds to scan.

View File

@ -23,16 +23,6 @@ To enable this feature, add the following lines to your `configuration.yaml`:
# Example configuration.yaml entry
binary_sensor:
platform: nx584
host: 192.168.1.10
pport: 5007
exclude_zones:
- 3
- 5
zone_types:
1: opening
2: opening
4: motion
6: moisture
```
Configuration variables:
@ -42,3 +32,19 @@ Configuration variables:
- **exclude_zones** (*Optional*): This is a list of zone numbers that should be excluded. Use this to avoid exposing a zone that is of no interest, unconnected, etc.
- **zone_types** (*Optional*): This is a list of zone numbers mapped to zone types. Use this to designate zones as doors, motion sensors, smoke detectors, etc. The list of available zone types relevant to alarm zones are: `opening`, `motion`, `gas`, `smoke`, `moisture`, `safety`.
An extended configuration entry could look like this:
```yaml
# Full example configuration.yaml entry
binary_sensor:
platform: nx584
host: 192.168.1.10
port: 5007
exclude_zones:
- 3
- 5
zone_types:
1: opening
2: opening
4: motion
6: moisture

View File

@ -10,6 +10,7 @@ footer: true
logo: octoprint.png
ha_category: Binary Sensor
ha_release: 0.19
ha_iot_class: "Local Polling"
---
@ -23,8 +24,7 @@ To set it up, add the following information to your `configuration.yaml` file:
```yaml
binary_sensor:
platform: octoprint
name: OctoPrint
- platform: octoprint
monitored_conditions:
- Printing
- Printing Error
@ -32,8 +32,7 @@ binary_sensor:
Configuration variables:
- **name** (*Optional*): The name of the sensor. Default is 'OctoPrint'.
- **monitored_conditions** array (*Required*): States to monitor.
- **Printing**: State of the printer.
- **Printing Error**: Error while printing.
- **name** (*Optional*): The name of the sensor. Default is 'OctoPrint'.

View File

@ -9,6 +9,7 @@ sharing: true
footer: true
ha_category: Binary Sensor
ha_release: "0.10"
ha_iot_class: "Local Polling"
---
@ -31,13 +32,8 @@ To enable this sensor, add the following lines to your `configuration.yaml` file
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: rest
- platform: rest
resource: http://IP_ADDRESS/ENDPOINT
method: GET
name: REST GET binary sensor
sensor_class: opening
value_template: '{% raw %}{{ value_json.state }}{% endraw %}'
verify_ssl: False
```
or for a POST request:
@ -45,13 +41,9 @@ or for a POST request:
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: rest
- platform: rest
resource: http://IP_ADDRESS/ENDPOINT
method: POST
name: REST POST binary sensor
sensor_class: opening
value_template: '{% raw %}{{ value_json.state }}{% endraw %}'
payload: '{ "device" : "door" }'
```
Configuration variables:
@ -68,3 +60,22 @@ Configuration variables:
Make sure that the URL matches exactly your endpoint or resource.
</p>
## {% linkable_title Examples %}
In this section you find some real life examples of how to use this sensor.
### {% linkable_title aREST sensor %}
Instead of using an [aREST](/components/binary_sensor.arest/) binary sensor could the value of a device supporting aREST directly retrieved with a REST binary sensor.
```yaml
binary_sensor:
- platform: rest
resource: http://192.168.0.5/digital/9
method: GET
name: Light
sensor_class: light
value_template: '{{ value_json.return_value }}'
```

View File

@ -10,6 +10,7 @@ footer: true
logo: raspberry-pi.png
ha_category: Binary Sensor
ha_release: pre 0.7
ha_iot_class: "Local Push"
---
The `rpi_gpio` binary sensor platform allows you to read sensor values of the GPIOs of your [Raspberry Pi](https://www.raspberrypi.org/).
@ -19,13 +20,10 @@ To use your Raspberry Pi's GPIO in your installation, add the following to your
```yaml
# Example configuration.yaml entry
binary_sensor:
platform: rpi_gpio
- platform: rpi_gpio
ports:
11: PIR Office
12: PIR Bedroom
pull_mode: "UP"
bouncetime: 50
invert_logic: false
```
Configuration variables:

View File

@ -7,7 +7,7 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: sleepiq
logo: sleepiq.png
ha_category: Binary Sensor
ha_release: 0.29
ha_iot_class: "Local Polling"

View File

@ -25,8 +25,6 @@ binary_sensor:
payload: "r State\n"
value_on: 1
timeout: 5
value_template: "{% raw %}{{ value.split(';')[0] }}{% endraw %}"
buffer_size: BUFFER_SIZE
```
Configuration options for the a TCP Sensor:

View File

@ -13,7 +13,7 @@ ha_release: 0.28
ha_iot_class: "Local Push"
---
The `trend` platform allows you to create sensors which show the trend of numeric `state` or`state_attributes` from other entities. This sensor requires two updates of the underlying sensor to establish a trend - so it can take some time to show an accurate state. It can be useful as part of automations, where you want to base an action on a trend.
The `trend` platform allows you to create sensors which show the trend of numeric `state` or`state_attributes` from other entities. This sensor requires two updates of the underlying sensor to establish a trend. Thus it can take some time to show an accurate state. It can be useful as part of automations, where you want to base an action on a trend.
To enable Trend binary sensors in your installation, add the following to your `configuration.yaml` file:
@ -23,10 +23,7 @@ binary_sensor:
- platform: trend
sensors:
solar_angle:
friendly_name: 'Sun rising'
entity_id: sun.sun
sensor_class: light
attribute: elevation
```
Configuration variables:
@ -35,7 +32,7 @@ Configuration variables:
- **friendly_name** (*Optional*): Name to use in the Frontend.
- **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend.
- **entity_id** (*Required*): The entity that this sensor tracks.
- **attribute** (*Optional*): The attribute of the entity that this sensor tracks. If no attribute is specified - the sensor will track the state.
- **attribute** (*Optional*): The attribute of the entity that this sensor tracks. If no attribute is specified then the sensor will track the state.
- **invert** (*Optional*): Invert the result (so `true` means decending rather than ascending)
## {% linkable_title Examples %}
@ -44,7 +41,7 @@ In this section you find some real life examples of how to use this sensor.
### {% linkable_title Temperature trend %}
This example indicates true if the temperture is rising:
This example indicates `true` if the temperture is rising:
```yaml
binary_sensor:
@ -56,7 +53,7 @@ binary_sensor:
sensor_class: heat
```
And this one indicates true if the temperture is falling:
And this one indicates `true` if the temperture is falling:
```yaml
binary_sensor:

View File

@ -10,6 +10,7 @@ footer: true
logo: vera.png
ha_category: Binary Sensor
ha_iot_class: "Local Push"
ha_release: pre 0.7
---
The `vera` platform allows you to get data from your [Vera](http://getvera.com/) binary sensors from within Home Assistant.

View File

@ -10,6 +10,7 @@ footer: true
logo: wink.png
ha_category: Binary Sensor
ha_release: 0.14
ha_iot_class: "Cloud Polling"
---

View File

@ -13,7 +13,7 @@ ha_release: 0.12
ha_iot_class: "Local Polling"
---
A `zigbee` binary sha_release: 0.13ensor in this context is a device connected to one of the digital input pins on a [ZigBee](http://www.zigbee.org/) module. The states reported by such a device are limited to `on` or `off`. By default, a binary sensor is considered `on` when the ZigBee device's digital input pin is held 'high' and considered `off` when it is held `low`. This behaviour can be inverted by setting the `on_state` configuration variable to `low`.
A `zigbee` binary sensor in this context is a device connected to one of the digital input pins on a [ZigBee](http://www.zigbee.org/) module. The states reported by such a device are limited to `on` or `off`. By default, a binary sensor is considered `on` when the ZigBee device's digital input pin is held 'high' and considered `off` when it is held `low`. This behaviour can be inverted by setting the `on_state` configuration variable to `low`.
To enable a digital input pin as binary sensor in your installation, add the following lines to your `configuration.yaml`:
@ -23,14 +23,12 @@ binary_sensor:
- platform: zigbee
name: Hallway PIR Sensor
pin: 0
address: 0013A20040892FA2
on_state: low
```
Configuration variables:
- **name** (*Required*): The name you wouldd like to give the binary sensor in Home Assistant.
- **pin** (*Required*): The number identifying which pin to use.
- **address**: The long 64bit address of the remote ZigBee device whose digital input pin you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's pins.
- **on_state**: Either `high` (default) or `low`, depicting whether the binary sensor is considered `on` when the pin is `high` or `low`.
- **address** (*Optional*): The long 64bit address of the remote ZigBee device whose digital input pin you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's pins.
- **on_state** (*Optional*): Either `high` (default) or `low`, depicting whether the binary sensor is considered `on` when the pin is `high` or `low`.

View File

@ -10,6 +10,7 @@ footer: true
logo: z-wave.png
ha_category: Binary Sensor
ha_release: 0.14
ha_iot_class: "Local Push"
---
To get your Z-Wave binary sensors working with Home Assistant, follow the instructions for the general [Z-Wave component](/components/zwave/).