Site updated at 2017-12-04 07:45:39 UTC

This commit is contained in:
Travis CI 2017-12-04 07:45:40 +00:00
parent 5fe4e87d5f
commit 9057180873
30 changed files with 243 additions and 112 deletions

View file

@ -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>

View file

@ -90,7 +90,7 @@
<li><strong>target_sensor</strong> (<em>Required</em>): <code class="highlighter-rouge">entity_id</code> for a temperature sensor, target_sensor.state must be temperature.</li>
<li><strong>min_temp</strong> (<em>Optional</em>): Set minimum set point available (default: 7)</li>
<li><strong>max_temp</strong> (<em>Optional</em>): Set maximum set point available (default: 35)</li>
<li><strong>target_temp</strong> (<em>Optional</em>): Set initial target temperature. Failure to set this variable will result in target temperature being set to null on startup.</li>
<li><strong>target_temp</strong> (<em>Optional</em>): Set initial target temperature. Failure to set this variable will result in target temperature being set to null on startup. As of version 0.59 it will retain the target temperature set before restart if this variable is not configured.</li>
<li><strong>ac_mode</strong> (<em>Optional</em>): Set the switch specified in the <em>heater</em> option to be treated as a cooling device instead of a heating device.</li>
<li><strong>min_cycle_duration</strong> (<em>Optional</em>): Set a minimum amount of time that the switch specified in the <em>heater</em> option must be in its current state prior to being switched either off or on.</li>
<li><strong>cold_tolerance</strong> (<em>Optional</em>): Set a minimum amount of difference between the temperature read by the sensor specified in the <em>target_sensor</em> option and the target temperature that must change prior to being switched on. For example, if the target temperature is 25 and the tolerance is 0.5 the heater will start when the sensor equals or goes below 24.5.</li>

View file

@ -91,21 +91,63 @@
<span class="s">payload</span><span class="pi">:</span> <span class="s1">'</span><span class="s">{</span><span class="nv"> </span><span class="s">"device"</span><span class="nv"> </span><span class="s">:</span><span class="nv"> </span><span class="s">"heater"</span><span class="nv"> </span><span class="s">}'</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 <code class="highlighter-rouge">GET</code>.</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. Depends on the service, but usually formed as JSON.</li>
<li><strong>name</strong> (<em>Optional</em>): Name of the REST sensor.</li>
<li><strong>unit_of_measurement</strong> (<em>Optional</em>): Defines the unit of measurement of the sensor, if any.</li>
<li><strong>verify_ssl</strong> (<em>Optional</em>): Verify the certification of the endpoint. Default to <code class="highlighter-rouge">True</code>.</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>
<li><strong>json_attributes</strong> (<em>Optional</em>): A list of keys to extract values from a JSON dictionary result and then set as sensor attributes. Default is an empty list.</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 sensor.</span></p>
<p class="default">Default value: REST Sensor</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. Depends on the service, but usually formed as JSON.</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="unit_of_measurement" href="#unit_of_measurement"></a> unit_of_measurement</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">Defines the units of measurement of the sensor, if any.</span></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>
<dt><a class="title-link" name="json_attributes" href="#json_attributes"></a> json_attributes</dt>
<dd>
<p class="desc"><span class="type">(<span class="list, string">list | string</span>)</span><span class="description">A list of keys to extract values from a JSON dictionary result and then set as sensor attributes.</span></p>
</dd>
</dl>
</div>
<p class="note warning">
Make sure that the URL exactly matches your endpoint or resource.
</p>

View file

@ -81,16 +81,30 @@
<span class="pi">-</span> <span class="s">platform</span><span class="pi">:</span> <span class="s">temper</span>
</code></pre>
</div>
<p>Configuration option:</p>
<ul>
<li><strong>name</strong> (<em>Optional</em>): The name you would like to give the sensor in Home Assistant.</li>
<li><strong>scale</strong> (<em>Optional</em>): The scale for the sensor.</li>
<li><strong>offset</strong> (<em>Optional</em>): The offset to fix reported vales.</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="offset" href="#offset"></a> offset</dt>
<dd>
<p class="desc"><span class="type">(<span class="int">int</span>)</span><span class="required">(Optional)</span><span class="description">The offset to fix reported vales.</span></p>
<p class="default">Default value: o</p>
</dd>
<dt><a class="title-link" name="scale" href="#scale"></a> scale</dt>
<dd>
<p class="desc"><span class="type">(<span class="int">int</span>)</span><span class="required">(Optional)</span><span class="description">The scale for the sensor.</span></p>
<p class="default">Default value: 1</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">The name to use when displaying this switch.</span></p>
<p class="default">Default value: myStrom Switch</p>
</dd>
</dl>
</div>
<p>Since some of these sensors consistently show higher temperatures the scale and offset values can be used to fine-tune your sensor.
The calculation follows the formula <code class="highlighter-rouge">scale * sensor value + offset</code>.</p>
<p>The TEMPer sensors can only be accessed as root by default. To fix the USB permissions on your system create the file <code class="highlighter-rouge">/etc/udev/rules.d/99-tempsensor.rules</code> and add the following line to it:</p>
<div class="highlighter-rouge"><pre class="highlight"><code>SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7401", MODE="666"
<div class="language-text highlighter-rouge"><pre class="highlight"><code>SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7401", MODE="666"
</code></pre>
</div>
<p>After that re-plug the device and restart Home Assistant.</p>

View file

@ -82,17 +82,53 @@
<span class="s">resource</span><span class="pi">:</span> <span class="s">http://IP_ADDRESS/ENDPOINT</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>name</strong> (<em>Optional</em>): Name of the REST switch.</li>
<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>
<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>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>
</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. Supported <code class="highlighter-rouge">post</code> or <code class="highlighter-rouge">put</code>.</span></p>
<p class="default">Default value: POST</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 Switch.</span></p>
<p class="default">Default value: REST Binary Switch</p>
</dd>
<dt><a class="title-link" name="timeout" href="#timeout"></a> timeout</dt>
<dd>
<p class="desc"><span class="type">(<span class="int">int</span>)</span><span class="required">(Optional)</span><span class="description">Timeout for the request.</span></p>
<p class="default">Default value: 10</p>
</dd>
<dt><a class="title-link" name="body_on" href="#body_on"></a> body_on</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The body of the POST request that commands the switch to become enabled. This value can be a <a href="/topics/templating/">template</a>.</span></p>
<p class="default">Default value: true</p>
</dd>
<dt><a class="title-link" name="body_off" href="#body_off"></a> body_off</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">The body of the POST request that commands the switch to become disabled. This value can also be a <a href="/topics/templating/">template</a>.</span></p>
<p class="default">Default value: false</p>
</dd>
<dt><a class="title-link" name="is_on_template" href="#is_on_template"></a> is_on_template</dt>
<dd>
<p class="desc"><span class="type">(<span class="string">string</span>)</span><span class="required">(Optional)</span><span class="description">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.</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>
</dl>
</div>
<p class="note warning">
Make sure that the URL matches exactly your endpoint or resource.
</p>