Place example in a section

This commit is contained in:
Fabian Affolter 2016-08-13 09:17:43 +02:00
parent 820aaafc79
commit fbe1a09fe5
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -11,30 +11,45 @@ logo: zigbee.png
ha_category: Sensor
---
There are two types of ZigBee sensor available to Home Assistant:
There are two types of [ZigBee](http://www.zigbee.org/) sensor available to Home Assistant:
- [Analog input pin](#analog-input-pin)
- [Temperature sensor](#temperature-sensor) (XBee Pro)
## {% linkable_title Analog Input Pin %}
The analog input pins on an XBee (non-Pro) will read 0V to 1.2V. This is translated by the [xbee-helper](https://github.com/flyte/xbee-helper) library into a percentage. The maximum voltage your ZigBee device will read is configurable using the `max_volts` configuration variable.
To configure an analog input pin sensor, use the following variables:
- **name** (*Required*): The name you'd like to give the sensor in Home Assistant.
- **platform** (*Required*): Set to `zigbee`.
- **type** (*Required*): Set to `analog`.
- **pin** (*Required*): The number identifying which pin to sample.
- **address**: The long 64bit address of the remote ZigBee device whose analog input pin you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's pins.
- **max_volts**: The maximum voltage which the analog input pin is able to read. Default: `1.2`
#### Example
To configure an analog input pin sensor, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
- name: My Analog Input
platform: zigbee
- platform: zigbee
name: My Analog ZigBee Input
type: analog
pin: 0
address: 0013A2004233D138
```
Configuration variables:
- **name** (*Required*): The name you would like to give the sensor in Home Assistant.
- **type** (*Required*): Set to `analog` or `temperature`.
- **pin** (*Required*): The number identifying which pin to sample
- **address** (*Optional*): The long 64 bit address of the remote ZigBee device whose pin you would like to sample. Do not include this variable if you want to sample the local ZigBee device's pins.
- **max_volts** (*Optional*): The maximum voltage which the input pin is able to read. Defaults to `1.2`
## {% linkable_title Examples %}
### {% linkable_title Analog Input Pin %}
The analog input pins on an XBee (non-Pro) will read 0V to 1.2 V. This is translated by the [xbee-helper](https://github.com/flyte/xbee-helper) library into a percentage. The maximum voltage your ZigBee device will read is configurable using the `max_volts` configuration variable.
To configure an analog input pin sensor, add the following to your `configuration.yaml` file:
```yaml
## Example configuration.yaml entry
sensor:
- platform: zigbee
name: My Analog ZigBee Input
type: analog
pin: 0
address: 0013A2004233D138
@ -44,19 +59,16 @@ See the [Digi knowledge base](http://knowledge.digi.com/articles/Knowledge_Base_
## {% linkable_title Temperature Sensor %}
The XBee Pro (and perhaps other third party modules) contains a thermometer device which can be read by using the `TP` AT command. To set this up as a temperature sensor device in Home Assistant use the following config variables:
The XBee Pro (and perhaps other third party modules) contains a thermometer device which can be read by using the `TP` AT command.
- **name** (*Required*): The name you'd like to give the temperature sensor in Home Assistant
- **platform** (*Required*): Set to `zigbee`
- **type** (*Required*): Set to `temperature`
- **address**: The long 64bit address of the remote ZigBee device whose temperature sensor you'd like to sample. Do not include this variable if you want to sample the local ZigBee device's temperature.
#### Example
To configure a temperature sensor device, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
- name: Living Room Temperature
platform: zigbee
- platform: zigbee
name: Living Room Temperature ZigBee
type: temperature
address: 0013A20050E752C5
```
```