Update ADS documentation (#4145)

This commit is contained in:
Fabian Affolter 2017-12-06 08:10:25 +01:00 committed by GitHub
parent 39bed44f77
commit 93f964b786
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 73 deletions

View file

@ -7,17 +7,15 @@ sidebar: true
comments: false
sharing: true
footer: true
logo: home-assistant.png
logo: beckhoff.png
ha_category: Sensor
ha_release: 0.60
ha_release: "0.60"
ha_iot_class: "Local Push"
---
The `ADS` sensor platform allows reading the value of a numeric variable on
your ADS device. The variable can be of type *INT*, *UINT* or *BYTE*.
The `ads` sensor platform allows reading the value of a numeric variable on your ADS device. The variable can be of type *INT*, *UINT* or *BYTE*.
To use your ADS device, you first have to set up your [ADS
hub](/components/ads/) and then add the following to your `configuration.yaml`
To use your ADS device, you first have to set up your [ADS hub](/components/ads/) and then add the following to your `configuration.yaml`
file:
```yaml
@ -29,29 +27,25 @@ sensor:
adstype: int
```
Configuration variables:
{% configuration %}
adsvar:
required: true
description: The name of the variable which you want to access
description: The name of the variable which you want to access.
type: string
adstype:
required: false
description: The datatype of the ADS variable, possible values are int, uint, byte
description: The datatype of the ADS variable, possible values are int, uint, byte.
default: int
type: string
name:
required: false
description: An identifier for the sensor
description: An identifier for the sensor.
type: string
factor:
required: false
description: A factor that divides the stored value before displaying in Home Assistant
description: A factor that divides the stored value before displaying in Home Assistant.
default: 1
type: integer
{% endconfiguration %}
The *factor* can be used to implement fixed decimals. E.g., set *factor* to 100
if you want to display a fixed decimal value with two decimals. A variable
value of `123` will be displayed as `1.23`.
The *factor* can be used to implement fixed decimals. E.g., set *factor* to 100 if you want to display a fixed decimal value with two decimals. A variable value of `123` will be displayed as `1.23`.