You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/switch.arest.markdown
+37-13Lines changed: 37 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ha_iot_class: "Local Polling"
13
13
ha_release: 0.16
14
14
---
15
15
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.
17
17
18
18
To use your aREST enabled device with pins in your installation, add the following to your `configuration.yaml` file:
19
19
@@ -25,6 +25,9 @@ switch:
25
25
pins:
26
26
11:
27
27
name: Fan
28
+
13:
29
+
name: Switch
30
+
invert: True
28
31
```
29
32
30
33
If you want to use custom functions, then add the following to your `configuration.yaml` file:
@@ -39,18 +42,39 @@ switch:
39
42
function1:
40
43
name: Light Desk
41
44
```
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 %}
54
78
55
79
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.
0 commit comments