Site updated at 2017-10-25 05:35:17 UTC
This commit is contained in:
parent
882302d13b
commit
d7c448f569
34 changed files with 87 additions and 87 deletions
|
@ -74,10 +74,10 @@
|
|||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
<p>The <code class="highlighter-rouge">mqtt</code> switch platform let you control your MQTT enabled switch.</p>
|
||||
<p>In an ideal scenario, the MQTT device will have a <code class="highlighter-rouge">state_topic</code> to publish state changes. If these messages are published with <code class="highlighter-rouge">RETAIN</code> flag, the MQTT switch will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state of the switch will be false/off.</p>
|
||||
<p>When a <code class="highlighter-rouge">state_topic</code> is not available, the switch will work in optimistic mode. In this mode, the switch will immediately change state after every command. Otherwise, the switch will wait for state confirmation from device (message from <code class="highlighter-rouge">state_topic</code>).</p>
|
||||
<p>Optimistic mode can be forced, even if state topic is available. Try to enable it, if experiencing incorrect switch operation.</p>
|
||||
<p>The <code class="highlighter-rouge">mqtt</code> switch platform lets you control your MQTT enabled switches.</p>
|
||||
<p>In an ideal scenario, the MQTT device will have a <code class="highlighter-rouge">state_topic</code> to publish state changes. If these messages are published with a <code class="highlighter-rouge">RETAIN</code> flag, the MQTT switch will receive an instant state update after subscription, and will start with the correct state. Otherwise, the initial state of the switch will be <code class="highlighter-rouge">false</code> / <code class="highlighter-rouge">off</code>.</p>
|
||||
<p>When a <code class="highlighter-rouge">state_topic</code> is not available, the switch will work in optimistic mode. In this mode, the switch will immediately change state after every command. Otherwise, the switch will wait for state confirmation from the device (message from <code class="highlighter-rouge">state_topic</code>).</p>
|
||||
<p>Optimistic mode can be forced, even if the <code class="highlighter-rouge">state_topic</code> is available. Try to enable it, if experiencing incorrect switch operation.</p>
|
||||
<p>To enable this switch in your installation, add the following to your <code class="highlighter-rouge">configuration.yaml</code> file:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yml entry</span>
|
||||
<span class="s">switch</span><span class="pi">:</span>
|
||||
|
@ -101,10 +101,10 @@
|
|||
<li><strong>value_template</strong> (<em>Optional</em>): Defines a <a href="/docs/configuration/templating/#processing-incoming-data">template</a> to extract a value from the payload.</li>
|
||||
</ul>
|
||||
<p class="note warning">
|
||||
Make sure that your topic match exact. <code class="highlighter-rouge">some-topic/</code> and <code class="highlighter-rouge">some-topic</code> are different topics.
|
||||
Make sure that your topic matches exactly. <code class="highlighter-rouge">some-topic/</code> and <code class="highlighter-rouge">some-topic</code> are different topics.
|
||||
</p>
|
||||
<h2><a class="title-link" name="examples" href="#examples"></a> Examples</h2>
|
||||
<p>In this section you find some real life examples of how to use this sensor.</p>
|
||||
<p>In this section you will find some real life examples of how to use this sensor.</p>
|
||||
<h3><a class="title-link" name="full-configuration" href="#full-configuration"></a> Full configuration</h3>
|
||||
<p>The example below shows a full configuration for a switch.</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yml entry</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue