Site updated at 2016-08-22 08:21:42 UTC
This commit is contained in:
parent
f9d65cbe57
commit
4acb07bf8e
559 changed files with 18878 additions and 21688 deletions
|
@ -89,24 +89,22 @@
|
|||
<hr class="divider">
|
||||
|
||||
|
||||
<p>The TCP Binary Sensor is a type of <a href="/components/sensor.tcp/">TCP Sensor</a> which is either “off” or “on”. In order to use this sensor type, in addition to the configuration for the TCP Sensor, you must supply a <code>value_on</code> value to represent what is returned when the device is turned on.</p>
|
||||
<p>The TCP Binary Sensor is a type of <a href="/components/sensor.tcp/">TCP Sensor</a> which is either “off” or “on”. In order to use this sensor type, in addition to the configuration for the TCP Sensor, you must supply a <code class="highlighter-rouge">value_on</code> value to represent what is returned when the device is turned on.</p>
|
||||
|
||||
<p>To enable this sensor, add the following lines to your <code>configuration.yaml</code>:</p>
|
||||
<p>To enable this sensor, add the following lines to your <code class="highlighter-rouge">configuration.yaml</code>:</p>
|
||||
|
||||
<div class="highlighter-coderay"><div class="CodeRay">
|
||||
<div class="code"><pre><span class="key">binary_sensor</span>:
|
||||
<span class="comment"># Example configuration.yaml entry</span>
|
||||
<span class="key">platform</span>: <span class="string"><span class="content">tcp</span></span>
|
||||
<span class="key">name</span>: <span class="string"><span class="content">TCP Binary Sensor</span></span>
|
||||
<span class="key">host</span>: <span class="string"><span class="content">IP_ADDRESS</span></span>
|
||||
<span class="key">port</span>: <span class="string"><span class="content">PORT</span></span>
|
||||
<span class="key">payload</span>: <span class="string"><span class="delimiter">"</span><span class="content">r State\n</span><span class="delimiter">"</span></span>
|
||||
<span class="key">value_on</span>: <span class="string"><span class="content">1</span></span>
|
||||
<span class="key">timeout</span>: <span class="string"><span class="content">5</span></span>
|
||||
<span class="key">value_template</span>: <span class="string"><span class="delimiter">"</span><span class="content">{{ value.split(';')[0] }}</span><span class="delimiter">"</span></span>
|
||||
<span class="key">buffer_size</span>: <span class="string"><span class="content">BUFFER_SIZE</span></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">binary_sensor</span><span class="pi">:</span>
|
||||
<span class="c1"># Example configuration.yaml entry</span>
|
||||
<span class="s">platform</span><span class="pi">:</span> <span class="s">tcp</span>
|
||||
<span class="s">name</span><span class="pi">:</span> <span class="s">TCP Binary Sensor</span>
|
||||
<span class="s">host</span><span class="pi">:</span> <span class="s">IP_ADDRESS</span>
|
||||
<span class="s">port</span><span class="pi">:</span> <span class="s">PORT</span>
|
||||
<span class="s">payload</span><span class="pi">:</span> <span class="s2">"</span><span class="s">r</span><span class="nv"> </span><span class="s">State</span><span class="se">\n</span><span class="s">"</span>
|
||||
<span class="s">value_on</span><span class="pi">:</span> <span class="s">1</span>
|
||||
<span class="s">timeout</span><span class="pi">:</span> <span class="s">5</span>
|
||||
<span class="s">value_template</span><span class="pi">:</span> <span class="s2">"</span><span class="s">{{</span><span class="nv"> </span><span class="s">value.split(';')[0]</span><span class="nv"> </span><span class="s">}}"</span>
|
||||
<span class="s">buffer_size</span><span class="pi">:</span> <span class="s">BUFFER_SIZE</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>Configuration options for the a TCP Sensor:</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue