Skip to content

Commit b2c5eb7

Browse files
William Scanlonfrenck
William Scanlon
authored andcommitted
Updated aREST switch doc for invert (home-assistant#5377)
* Updated aREST switch doc for invert * Updated to configuration block * ✏️ Changed values of required configuration keys * ✏️ Language tweak
1 parent a83ba64 commit b2c5eb7

File tree

1 file changed

+37
-13
lines changed

1 file changed

+37
-13
lines changed

source/_components/switch.arest.markdown

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ha_iot_class: "Local Polling"
1313
ha_release: 0.16
1414
---
1515

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.
16+
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.
1717

1818
To use your aREST enabled device with pins in your installation, add the following to your `configuration.yaml` file:
1919

@@ -25,6 +25,9 @@ switch:
2525
pins:
2626
11:
2727
name: Fan
28+
13:
29+
name: Switch
30+
invert: True
2831
```
2932
3033
If you want to use custom functions, then add the following to your `configuration.yaml` file:
@@ -39,18 +42,39 @@ switch:
3942
function1:
4043
name: Light Desk
4144
```
42-
43-
Configuration variables:
44-
45-
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, eg. http://192.168.1.10 (no-trailing slash)
46-
- **name** (*Optional*): Let you overwrite the name of the device. By default *name* from the device is used.
47-
- **pins** array (*Optional*): An array with all used pins.
48-
- **name** (*Required*): The name of the pin to use in the frontend.
49-
50-
or
51-
52-
- **functions** array (*Optional*): An array with all used functions.
53-
- **name** (*Required*): The name to use in the frontend.
45+
{% configuration %}
46+
resource:
47+
description: IP address and schema of the device that is exposing an aREST API, e.g., http://192.168.1.10 (no-trailing slash)
48+
required: true
49+
type: string
50+
name:
51+
description: Let you overwrite the name of the device. By default *name* from the device is used.
52+
required: optional
53+
type: string
54+
pins:
55+
description: An array with all used pins.
56+
required: false
57+
type: map
58+
keys:
59+
name:
60+
description: The name of the pin to use in the frontend.
61+
required: true
62+
type: string
63+
invert:
64+
description: If the logic for on/off should be inverted.
65+
required: false
66+
type: boolean
67+
default: false
68+
functions:
69+
description: An array with all used functions.
70+
required: false
71+
type: map
72+
keys:
73+
name:
74+
description: The name to use in the frontend.
75+
required: true
76+
type: string
77+
{% endconfiguration %}
5478

5579
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.
5680

0 commit comments

Comments
 (0)