Merge branch 'current' into next

This commit is contained in:
Fabian Affolter 2017-06-03 09:37:04 +02:00
commit 89237a4b2a
No known key found for this signature in database
GPG key ID: E23CD2DD36A4397F
58 changed files with 652 additions and 360 deletions

View file

@ -419,7 +419,9 @@ Returns a list of states that have changed while the service was being executed.
]
```
Sample `curl` command:
Sample `curl` commands:
Turn the light on:
```bash
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
@ -428,6 +430,16 @@ $ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
http://localhost:8123/api/services/switch/turn_on
```
Send a MQTT message:
```bash
$ curl -X POST \
-H "Content-Type: application/json" \
-H "x-ha-access:YOUR_PASSWORD" \
-d '{"payload": "OFF", "topic": "home/fridge", "retain": "True"}' \
http://localhost:8123/api/services/mqtt/publish
```
<p class='note'>
The result will include any states that changed while the service was being executed, even if their change was the result of something else happening in the system.
</p>