Site updated at 2017-12-04 07:45:39 UTC
This commit is contained in:
parent
5fe4e87d5f
commit
9057180873
30 changed files with 243 additions and 112 deletions
|
@ -100,20 +100,59 @@
|
|||
<span class="s">method</span><span class="pi">:</span> <span class="s">POST</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>Configuration variables:</p>
|
||||
<ul>
|
||||
<li><strong>resource</strong> (<em>Required</em>): The resource or endpoint that contains the value.</li>
|
||||
<li><strong>method</strong> (<em>Optional</em>): The method of the request. Default is GET.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): Name of the REST binary sensor.</li>
|
||||
<li><strong>device_class</strong> (<em>Optional</em>): The <a href="/components/binary_sensor/">type/class</a> of the sensor to set the icon in the frontend.</li>
|
||||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the value.</li>
|
||||
<li><strong>payload</strong> (<em>Optional</em>): The payload to send with a POST request. Usually formed as a dictionary.</li>
|
||||
<li><strong>verify_ssl</strong> (<em>Optional</em>): Verify the certification of the endpoint. Default to True.</li>
|
||||
<li><strong>authentication</strong> (<em>Optional</em>): Type of the HTTP authentication. <code class="highlighter-rouge">basic</code> or <code class="highlighter-rouge">digest</code>.</li>
|
||||
<li><strong>username</strong> (<em>Optional</em>): The username for accessing the REST endpoint.</li>
|
||||
<li><strong>password</strong> (<em>Optional</em>): The password for accessing the REST endpoint.</li>
|
||||
<li><strong>headers</strong> (<em>Optional</em>): The headers for the requests.</li>
|
||||
</ul>
|
||||
<div class="config-vars">
|
||||
<h3><a class="title-link" name="configuration-variables" href="#configuration-variables"></a> Configuration Variables</h3>
|
||||
<dl class="">
|
||||
<dt><a class="title-link" name="resource" href="#resource"></a> resource</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Required)</span><span class="description">The resource or endpoint that contains the value.</span></p>
|
||||
<p class="default">Default value: string</p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="method" href="#method"></a> method</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The method of the request.</span></p>
|
||||
<p class="default">Default value: GET</p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="name" href="#name"></a> name</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">Name of the REST binary sensor.</span></p>
|
||||
<p class="default">Default value: REST Binary Sensor</p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="device_class" href="#device_class"></a> device_class</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The <a href="/components/binary_sensor/">type/class</a> of the sensor to set the icon in the frontend.</span></p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="value_template" href="#value_template"></a> value_template</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="template"><a href="/docs/configuration/templating/">template</a></span>)</span><span class="required">(Optional)</span><span class="description">Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract the value.</span></p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="payload" href="#payload"></a> payload</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The payload to send with a POST request. Usually formed as a dictionary.</span></p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="verify_ssl" href="#verify_ssl"></a> verify_ssl</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="boolean">boolean</span>)</span><span class="required">(Optional)</span><span class="description">Verify the certification of the endpoint.</span></p>
|
||||
<p class="default">Default value: true</p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="authentication" href="#authentication"></a> authentication</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">Type of the HTTP authentication. <code class="highlighter-rouge">basic</code> or <code class="highlighter-rouge">digest</code>.</span></p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="username" href="#username"></a> username</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The username for accessing the REST endpoint.</span></p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="password" href="#password"></a> password</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The password for accessing the REST endpoint.</span></p>
|
||||
</dd>
|
||||
<dt><a class="title-link" name="headers" href="#headers"></a> headers</dt>
|
||||
<dd>
|
||||
<p class="desc"><span class="type">(<span class="list, string">list | string</span>)</span><span class="required">(Optional)</span><span class="description">The headers for the requests.</span></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<p class="note warning">
|
||||
Make sure that the URL exactly matches your endpoint or resource.
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue