diff --git a/atom.xml b/atom.xml index 4ea3d6b376..474f01d259 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
basic
or digest
.-Make sure that the URL matches exactly your endpoint or resource. +Make sure that the URL exactly matches your endpoint or resource.
Instead of using an aREST binary sensor could the value of a device supporting aREST directly retrieved with a REST binary sensor.
+Instead of using an aREST binary sensor, you could retrieve the value of a device supporting aREST directly with a REST binary sensor.
binary_sensor:
- platform: rest
@@ -153,10 +157,35 @@ Make sure that the URL matches exactly your endpoint or resource.
method: GET
name: Light
sensor_class: light
- value_template: ''
+ value_template: '{{ value_json.return_value }}'
The REST sensor supports HTTP authentication and customized headers.
+ +binary_sensor:
+ - platform: rest
+ resource: http://IP_ADDRESS:5000/binary_sensor
+ username: ha1
+ password: test1
+ authentication: basic
+ headers:
+ User-Agent: Home Assistant
+ Content-Type: application/json
+
+The headers will contain all relevant details. This will also give you the ability to access endpoints that are protected by tokens.
+ +```bash +Content-Length: 1024 +Host: IP_ADDRESS1:5000 +Authorization: Basic aGExOnRlc3Qx +Accept-Encoding: identity +Content-Type: application/json +User-Agent: Home Assistant
diff --git a/components/sensor.rest/index.html b/components/sensor.rest/index.html index 38ec1d6dcf..ae180d01dc 100644 --- a/components/sensor.rest/index.html +++ b/components/sensor.rest/index.html @@ -129,10 +129,10 @@-Make sure that the URL matches exactly your endpoint or resource. +Make sure that the URL exactly matches your endpoint or resource.
-curl
could help you with the identification of the variable you want to display in your Home Assistant frontend. The example below show the JSON response of a device that is running with aREST.
curl
can help you identify the variable you want to display in your Home Assistant frontend. The example below shows the JSON response of a device that is running with aREST.
$ curl -X GET http://192.168.1.31/temperature/
{"temperature": 77, "id": "sensor02", "name": "livingroom", "connected": true}
@@ -198,14 +198,14 @@ Make sure that the URL matches exactly your endpoint or resource.
password: test1
authentication: basic
headers:
- User-agent: Home Assistant
+ User-Agent: Home Assistant
Content-Type: application/json
The header will contains all relevant details. This will give you the flexibility to access also endpoints wich are protected by Tokens.
+The headers will contain all relevant details. This will also give you the ability to access endpoints that are protected by tokens.
-Content-Length:
+Content-Length: 1024
Host: IP_ADDRESS1:5000
Authorization: Basic aGExOnRlc3Qx
Accept-Encoding: identity
@@ -216,7 +216,7 @@ User-Agent: Home Assistant
Use GitHub to get the latest release of Home Assistant
-This sample is very similar to the updater
component but the information are recieved from GitHub.
+This sample is very similar to the updater
component but the information is recieved from GitHub.
sensor:
- platform: rest
diff --git a/sitemap.xml b/sitemap.xml
index 844fff6e3b..9b12b6a96b 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2308,62 +2308,62 @@
https://home-assistant.io/demo/frontend.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/index.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00
https://home-assistant.io/static/mdi-demo.html
-2016-10-30T11:32:27+00:00
+2016-10-30T15:02:58+00:00