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
|
@ -112,7 +112,8 @@ You should choose a unique device name (DEVICE_NAME) to avoid clashes with other
|
|||
<p>For a quick test <code>curl</code> can be useful to “simulate” a device.</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre>$ curl -XPOST -H "x-ha-access: YOUR_PASSWORD" \
|
||||
<div class="code"><pre>$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"state": "20", "attributes": {"unit_of_measurement": "°C", "friendly_name": "Bathroom Temp"}}' \
|
||||
http://localhost:8123/api/states/sensor.bathroom_temperature
|
||||
</pre></div>
|
||||
|
@ -123,7 +124,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/sensor.bathroom_temperature
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8123/api/states/sensor.bathroom_temperature
|
||||
{
|
||||
"attributes": {
|
||||
"friendly_name": "Bathroom Temp",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue