Various fixes (#5302)

This commit is contained in:
Fabian Affolter 2018-05-03 22:01:32 +02:00 committed by GitHub
parent bc01c98712
commit 334a06b4d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 106 additions and 46 deletions

View file

@ -15,6 +15,8 @@ ha_iot_class: "Local Polling"
The `rest` switch platform allows you to control a given endpoint that supports a [RESTful API](https://en.wikipedia.org/wiki/Representational_state_transfer). The switch can get the state via GET and set the state via POST on a given REST resource.
## {% linkable_title Configuration %}
To enable this switch, add the following lines to your `configuration.yaml` file:
```yaml
@ -93,7 +95,7 @@ switch:
resource: http://IP_ADDRESS/led_endpoint
body_on: '{"active": "true"}'
body_off: '{"active": "false"}'
is_on_template: '{{value_json.is_active}}'
is_on_template: '{{ value_json.is_active }}'
headers:
Content-Type: application/json
```