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/sensor.rest.markdown
+28-6Lines changed: 28 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -19,19 +19,19 @@ To enable this sensor, add the following lines to your `configuration.yaml` file
19
19
```yaml
20
20
# Example configuration.yaml entry
21
21
sensor:
22
-
platform: rest
23
-
resource: http://IP_ADDRESS/ENDPOINT
22
+
- platform: rest
23
+
resource: http://IP_ADDRESS/ENDPOINT
24
24
```
25
25
26
26
or for a POST request:
27
27
28
28
```yaml
29
29
# Example configuration.yaml entry
30
30
sensor:
31
-
platform: rest
32
-
resource: http://IP_ADDRESS/ENDPOINT
33
-
method: POST
34
-
payload: '{ "device" : "heater" }'
31
+
- platform: rest
32
+
resource: http://IP_ADDRESS/ENDPOINT
33
+
method: POST
34
+
payload: '{ "device" : "heater" }'
35
35
```
36
36
37
37
Configuration variables:
@@ -70,6 +70,7 @@ You can find your external IP address using the service [JSON Test](http://www.j
70
70
To display the IP address, the entry for a sensor in the `configuration.yaml` file will look like this.
71
71
72
72
```yaml
73
+
sensor:
73
74
- platform: rest
74
75
resource: http://ip.jsontest.com
75
76
name: External IP
@@ -83,6 +84,7 @@ The [glances](/components/sensor.glances/) sensor is doing the exact same thing
83
84
Add something similar to the entry below to your `configuration.yaml` file:
84
85
85
86
```yaml
87
+
sensor:
86
88
- platform: rest
87
89
resource: http://IP_ADRRESS:61208/api/2/mem/used
88
90
name: Used mem
@@ -95,6 +97,7 @@ Add something similar to the entry below to your `configuration.yaml` file:
95
97
The Home Assistant [API](/developers/rest_api/) exposes the data from your attached sensors. If you are running multiple Home Assistant instances which are not [connected](/developers/architecture/#multiple-connected-instances) you can still get information from them.
0 commit comments