Site updated at 2017-05-28 17:47:20 UTC

This commit is contained in:
Travis CI 2017-05-28 17:47:20 +00:00
parent af7b503546
commit 39e60ce9d2
50 changed files with 130 additions and 117 deletions

View file

@ -80,7 +80,7 @@
<li><strong>name</strong> (<em>Optional</em>): Name of the REST switch.</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="/topics/templating/">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>. See <a href="/docs/configuration/templating/#processing-incoming-data">this example</a> in the template documentation. 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>
<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>
</ul>
<p class="note warning">
Make sure that the URL matches exactly your endpoint or resource.