Site updated at 2017-05-16 06:28:08 UTC
This commit is contained in:
parent
372fd6d0fe
commit
265ab53ff8
28 changed files with 51 additions and 52 deletions
|
@ -84,7 +84,7 @@
|
|||
<li><strong>allowed_chat_ids</strong> (<em>Required</em>): A list of user in the <code class="highlighter-rouge">user_id</code> Telegram format enabled to interact to webhook</li>
|
||||
<li><strong>api_key</strong> (<em>Required</em>): The API token of your bot.</li>
|
||||
</ul>
|
||||
<p>To get your <code class="highlighter-rouge">chat_id</code> and <code class="highlighter-rouge">api_key</code> follow the instructions <a href="/components.notify.telegram">here</a> .</p>
|
||||
<p>To get your <code class="highlighter-rouge">chat_id</code> and <code class="highlighter-rouge">api_key</code> follow the instructions <a href="/components/notify.telegram">here</a> .</p>
|
||||
</article>
|
||||
</div>
|
||||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<li><strong>api_key</strong> (<em>Required</em>): The API token of your bot.</li>
|
||||
<li><strong>trusted_networks</strong> (<em>Optional</em>): Telegram server access ACL as list. Defaults to <code class="highlighter-rouge">149.154.167.197-233</code>.</li>
|
||||
</ul>
|
||||
<p>To get your <code class="highlighter-rouge">chat_id</code> and <code class="highlighter-rouge">api_key</code> follow the instructions <a href="/components.notify.telegram">here</a> .</p>
|
||||
<p>To get your <code class="highlighter-rouge">chat_id</code> and <code class="highlighter-rouge">api_key</code> follow the instructions <a href="/components/notify.telegram">here</a> .</p>
|
||||
<p>Full configuration sample:</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="c1"># Example configuration.yaml entry</span>
|
||||
<span class="s">http</span><span class="pi">:</span>
|
||||
|
|
|
@ -123,17 +123,17 @@
|
|||
</code></pre>
|
||||
</div>
|
||||
<p>An example to show the use of event_data in the action:</p>
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code>- alias: 'Kitchen Telegram Speak'
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: telegram_command
|
||||
event_data:
|
||||
command: '/speak'
|
||||
action:
|
||||
- service: notify.kitchen_echo
|
||||
data_template:
|
||||
message: >
|
||||
Message from {{ trigger.event.data["from_first"] }}. {% for state in trigger.event.data["args"] %} {{ state }} {% endfor %}
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="pi">-</span> <span class="s">alias</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Kitchen</span><span class="nv"> </span><span class="s">Telegram</span><span class="nv"> </span><span class="s">Speak'</span>
|
||||
<span class="s">trigger</span><span class="pi">:</span>
|
||||
<span class="s">platform</span><span class="pi">:</span> <span class="s">event</span>
|
||||
<span class="s">event_type</span><span class="pi">:</span> <span class="s">telegram_command</span>
|
||||
<span class="s">event_data</span><span class="pi">:</span>
|
||||
<span class="s">command</span><span class="pi">:</span> <span class="s1">'</span><span class="s">/speak'</span>
|
||||
<span class="s">action</span><span class="pi">:</span>
|
||||
<span class="pi">-</span> <span class="s">service</span><span class="pi">:</span> <span class="s">notify.kitchen_echo</span>
|
||||
<span class="s">data_template</span><span class="pi">:</span>
|
||||
<span class="s">message</span><span class="pi">:</span> <span class="pi">></span>
|
||||
<span class="no">Message from {{ trigger.event.data["from_first"] }}. {% for state in trigger.event.data["args"] %} {{ state }} {% endfor %}</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
</article>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue