mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Update binary_sensor.http.markdown
The sample call was missing -H "Content-Type: application/json" for the POST section, causing it to fail.
This commit is contained in:
parent
ececc2047d
commit
f725b01f50
@ -32,6 +32,7 @@ For a quick test `curl` can be useful to "simulate" a device.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
|
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
-d '{"state": "off", "attributes": {"friendly_name": "Radio"}}' \
|
-d '{"state": "off", "attributes": {"friendly_name": "Radio"}}' \
|
||||||
http://localhost:8123/api/states/binary_sensor.radio
|
http://localhost:8123/api/states/binary_sensor.radio
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user