Site updated at 2017-06-17 20:00:42 UTC
This commit is contained in:
parent
35ab32b13f
commit
933563f0be
808 changed files with 11423 additions and 2163 deletions
|
@ -77,7 +77,11 @@
|
|||
<p>Configuration variables:</p>
|
||||
<ul>
|
||||
<li><strong>resource</strong> (<em>Required</em>): The resource or endpoint that contains the value.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): Name of the REST switch.</li>
|
||||
<li><strong>name</strong> (<em>Optional</em>): Name of the REST switch.
|
||||
<ul>
|
||||
<li><strong>method</strong> (<em>Optional</em>): HTTP method to use (<code class="highlighter-rouge">post</code> or <code class="highlighter-rouge">put</code>). Defaults to <code class="highlighter-rouge">post</code>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>body_on</strong> (<em>Optional</em>): The body of the POST request that commands the switch to become enabled. Default is “ON”. This value can be a <a href="/topics/templating/">template</a>.</li>
|
||||
<li><strong>body_off</strong> (<em>Optional</em>): The body of the POST request that commands the switch to become disabled. Default is “OFF”. This value can also be a <a href="/topics/templating/">template</a>.</li>
|
||||
<li><strong>is_on_template</strong> (<em>Optional</em>): A <a href="/docs/configuration/templating/#processing-incoming-data">template</a> that determines the state of the switch from the value returned by the GET request on the resource URL. This template should compute to a boolean (True or False). If the value is valid JSON, it will be available in the template as the variable <code class="highlighter-rouge">value_json</code>. Default is equivalent to <code class="highlighter-rouge">'{{ value_json == body_on }}'</code>. This means that by default, the state of the switch is on if and only if the response to the GET request matches .</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue