Site updated at 2016-06-04 15:40:20 UTC
This commit is contained in:
parent
41be8cb2c7
commit
d214dd5fb3
26 changed files with 67 additions and 45 deletions
|
@ -123,7 +123,8 @@ You should choose a unique device name (DEVICE_NAME) to avoid clashes with other
|
|||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
|
||||
http://localhost:8123/api/states/binary_sensor.radio
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8123/api/states/binary_sensor.radio
|
||||
{
|
||||
"attributes": {
|
||||
"friendly_name": "Radio"
|
||||
|
@ -161,7 +162,7 @@ print(response.text)
|
|||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ http -v POST http://localhost:8123/api/states/binary_sensor.radio \
|
||||
x-ha-access:YOUR_PASSWORD state=off \
|
||||
x-ha-access:YOUR_PASSWORD content-type:application/json state=off \
|
||||
attributes:='{"friendly_name": "Radio"}'
|
||||
</pre></div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue