You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/switch.pilight/index.html
+60-33Lines changed: 60 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -89,63 +89,90 @@ <h1 class="title indent">
89
89
<hrclass="divider">
90
90
91
91
92
-
<p>A switch platform that issues 433 MHz commands using <ahref="https://www.pilight.org/">pilight</a> to turn a 433 MHz device on or off. The pilight HA hub has to be set up.</p>
92
+
<p>The <codeclass="highlighter-rouge">pilight</code>switch platform is issuing 433 MHz commands using <ahref="https://www.pilight.org/">pilight</a> to turn a 433 MHz device on or off. The Pilight Home Assistant hub has to be set up.</p>
93
93
94
-
<p>Additionally RF commands can be defined that trigger this switch to turn on and off. This allows you to also use the remote shipped with your 433 MHz switch without mixing up the HA states. You can even define several on/off commands, thus several RF remotes to toggle this switch.</p>
94
+
<p>Additionally RF commands can be defined that trigger this switch to turn on and off. This allows you to also use the remote shipped with your 433 MHz switch without mixing up the Home Assistant states. You can even define several on/off commands, thus several RF remotes to toggle this switch.</p>
95
95
96
-
<p>To be really sure that HA knows the actual state of your device it is recommended to use the RF remote with codes unknown to any of your 433 MHz devices. Thus you use the remote to trigger this switch to send the correct RF code to the device.</p>
96
+
<p>To be really sure that Home Assistant knows the actual state of your device it is recommended to use the RF remote with codes unknown to any of your 433 MHz devices. Thus you use the remote to trigger this switch to send the correct RF code to the device.</p>
97
97
98
-
<p>To define a pilight switch, add the following lines to your <codeclass="highlighter-rouge">configuration.yaml</code>:</p>
98
+
<p>To define a Pilight switch, add the following lines to your <codeclass="highlighter-rouge">configuration.yaml</code>:</p>
99
99
100
100
<divclass="language-yaml highlighter-rouge"><preclass="highlight"><code><spanclass="c1"># Example configuration.yaml entry</span>
<spanclass="s">protocol</span><spanclass="pi">:</span><spanclass="s">intertechno_old</span><spanclass="c1"># protocol has to be defined</span>
107
-
<spanclass="s">unit</span><spanclass="pi">:</span><spanclass="s">3</span><spanclass="c1"># these entries are protocol specific and can differ</span>
108
-
<spanclass="s">id</span><spanclass="pi">:</span><spanclass="s">4</span><spanclass="c1"># these entries are protocol specific and can differ</span>
109
-
<spanclass="s1">'</span><spanclass="s">on'</span><spanclass="pi">:</span><spanclass="s">1</span><spanclass="c1"># on has to be in apostrophes to be parsed correctly</span>
<spanclass="s">protocol</span><spanclass="pi">:</span><spanclass="s">intertechno_old</span><spanclass="c1"># protocol has to be defined</span>
112
-
<spanclass="s">unit</span><spanclass="pi">:</span><spanclass="s">3</span><spanclass="c1"># these entries are protocol specific and can differ</span>
113
-
<spanclass="s">id</span><spanclass="pi">:</span><spanclass="s">4</span><spanclass="c1"># these entries are protocol specific and can differ</span>
114
-
<spanclass="s1">'</span><spanclass="s">off'</span><spanclass="pi">:</span><spanclass="s">1</span><spanclass="c1"># off has to be in apostrophes to be parsed correctly</span>
<spanclass="s">protocol</span><spanclass="pi">:</span><spanclass="s">daycom</span><spanclass="c1"># protocol has to be defined</span>
117
-
<spanclass="s">systemcode</span><spanclass="pi">:</span><spanclass="s">14462</span><spanclass="c1"># these entries are protocol specific and can differ</span>
118
-
<spanclass="s">unit</span><spanclass="pi">:</span><spanclass="s">6</span><spanclass="c1"># these entries are protocol specific and can differ</span>
119
-
<spanclass="s">id</span><spanclass="pi">:</span><spanclass="s">34</span><spanclass="c1"># these entries are protocol specific and can differ</span>
120
-
<spanclass="s">state</span><spanclass="pi">:</span><spanclass="s1">'</span><spanclass="s">on'</span><spanclass="c1"># off has to be in apostrophes to be parsed correctly</span>
<spanclass="s">protocol</span><spanclass="pi">:</span><spanclass="s">daycom</span><spanclass="c1"># protocol has to be defined</span>
123
-
<spanclass="s">systemcode</span><spanclass="pi">:</span><spanclass="s">14462</span><spanclass="c1"># these entries are protocol specific and can differ</span>
124
-
<spanclass="s">unit</span><spanclass="pi">:</span><spanclass="s">6</span><spanclass="c1"># these entries are protocol specific and can differ</span>
125
-
<spanclass="s">id</span><spanclass="pi">:</span><spanclass="s">34</span><spanclass="c1"># these entries are protocol specific and can differ</span>
126
-
<spanclass="s">state</span><spanclass="pi">:</span><spanclass="s1">'</span><spanclass="s">off'</span><spanclass="c1"># on has to be in apostrophes to be parsed correctly</span>
<li><strong>switches</strong> (<em>Required</em>): The array that contains all command switches.
117
+
<li><strong>switches</strong>array (<em>Required</em>): The list that contains all command switches.
134
118
<ul>
135
-
<li><strong>entry</strong> (<em>Required</em>): Name of the command switch. Multiple entries are possible.
119
+
<li><strong>[entry]</strong> (<em>Required</em>): Name of the command switch. Multiple entries are possible.
136
120
<ul>
137
121
<li><strong>on_code</strong> (<em>Required</em>): The code to turn the device on.</li>
138
122
<li><strong>off_code</strong> (<em>Required</em>): The code to turn the device off.</li>
139
-
<li><strong>on_code_receive</strong> (<em>Optional</em>): If given, this command will turn the switch on if it is received by pilight.</li>
140
-
<li><strong>off_code_receive</strong> (<em>Optional</em>): If given, this command will turn the switch off if it is received by pilight.</li>
123
+
<li><strong>on_code_receive</strong> (<em>Optional</em>): If given, this command will turn the switch on if it is received by Pilight.</li>
124
+
<li><strong>off_code_receive</strong> (<em>Optional</em>): If given, this command will turn the switch off if it is received by Pilight.</li>
141
125
</ul>
142
126
</li>
143
127
</ul>
144
128
</li>
145
129
</ul>
146
130
131
+
<p>Variables for the different codes:</p>
132
+
133
+
<ul>
134
+
<li><strong>protocol</strong> (<em>Optional</em>): Protocol to use, eg. <codeclass="highlighter-rouge">intertechno_old</code> or <codeclass="highlighter-rouge">daycom</code>.</li>
135
+
<li><strong>systemcode</strong> (<em>Optional</em>): The systemcode of the device.</li>
136
+
<li><strong>unit</strong> (<em>Optional</em>): The unit to use.</li>
137
+
<li><strong>id</strong> (<em>Optional</em>): ID of the device</li>
138
+
<li><strong>state</strong> (<em>Optional</em>): <codeclass="highlighter-rouge">'on'</code> or <codeclass="highlighter-rouge">'off'</code> has to be in apostrophes to be parsed correctly.</li>
139
+
<li><strong>‘off’</strong> (<em>Optional</em>): <codeclass="highlighter-rouge">1</code> or <codeclass="highlighter-rouge">0</code></li>
140
+
<li><strong>‘on’</strong> (<em>Optional</em>): <codeclass="highlighter-rouge">1</code> or <codeclass="highlighter-rouge">0</code></li>
141
+
</ul>
142
+
147
143
<p>For possible code entries look at the <ahref="https://www.pilight.org/development/api/">pilight API</a>. All commands allowed by <ahref="https://wiki.pilight.org/doku.php/psend">pilight-send</a> can be used.</p>
0 commit comments