Updated aREST switch doc for invert (#5377)

* Updated aREST switch doc for invert

* Updated to configuration block

* ✏️ Changed values of required configuration keys

* ✏️ Language tweak
This commit is contained in:
William Scanlon 2018-05-18 09:42:43 -04:00 committed by Franck Nijhof
parent a83ba64ef5
commit b2c5eb78a6

View File

@ -13,7 +13,7 @@ ha_iot_class: "Local Polling"
ha_release: 0.16 ha_release: 0.16
--- ---
The `arest` switch platform allows you to toggle pins of your devices (like Arduino boards with a Ethernet/Wifi connection, ESP8266 based devices, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework. The `arest` switch platform allows you to toggle pins of your devices (like Arduino boards with an Ethernet/Wifi connection, ESP8266 based devices, and the Raspberry Pi) running the [aREST](http://arest.io/) RESTful framework.
To use your aREST enabled device with pins in your installation, add the following to your `configuration.yaml` file: To use your aREST enabled device with pins in your installation, add the following to your `configuration.yaml` file:
@ -25,6 +25,9 @@ switch:
pins: pins:
11: 11:
name: Fan name: Fan
13:
name: Switch
invert: True
``` ```
If you want to use custom functions, then add the following to your `configuration.yaml` file: If you want to use custom functions, then add the following to your `configuration.yaml` file:
@ -39,18 +42,39 @@ switch:
function1: function1:
name: Light Desk name: Light Desk
``` ```
{% configuration %}
Configuration variables: resource:
description: IP address and schema of the device that is exposing an aREST API, e.g., http://192.168.1.10 (no-trailing slash)
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, eg. http://192.168.1.10 (no-trailing slash) required: true
- **name** (*Optional*): Let you overwrite the name of the device. By default *name* from the device is used. type: string
- **pins** array (*Optional*): An array with all used pins. name:
- **name** (*Required*): The name of the pin to use in the frontend. description: Let you overwrite the name of the device. By default *name* from the device is used.
required: optional
or type: string
pins:
- **functions** array (*Optional*): An array with all used functions. description: An array with all used pins.
- **name** (*Required*): The name to use in the frontend. required: false
type: map
keys:
name:
description: The name of the pin to use in the frontend.
required: true
type: string
invert:
description: If the logic for on/off should be inverted.
required: false
type: boolean
default: false
functions:
description: An array with all used functions.
required: false
type: map
keys:
name:
description: The name to use in the frontend.
required: true
type: string
{% endconfiguration %}
You can still switch your pins with a web browser or a command line tool. Use the URL http://192.168.1.10/digital/8/1 to set pin 8 to high/on, the JSON response will give you the feedback. You can still switch your pins with a web browser or a command line tool. Use the URL http://192.168.1.10/digital/8/1 to set pin 8 to high/on, the JSON response will give you the feedback.