Site updated at 2017-08-13 08:33:49 UTC
This commit is contained in:
parent
57010870e8
commit
b20bf75713
26 changed files with 63 additions and 39 deletions
|
@ -219,6 +219,30 @@ Custom slot type for script support.
|
|||
</code></pre>
|
||||
</div>
|
||||
<p>Now say <code class="highlighter-rouge">Alexa ask homeassistant to run <some script></code> and Alexa will run that script for you.</p>
|
||||
<h3><a class="title-link" name="support-for-launch-requests" href="#support-for-launch-requests"></a> Support for Launch Requests</h3>
|
||||
<p>There may be times when you want to respond to a launch request initiated from a command such as “Alexa, Red Alert!”.</p>
|
||||
<p>To start you need to get the skill id:</p>
|
||||
<ul>
|
||||
<li>Log in to <a href="https://developer.amazon.com">Amazon developer console</a></li>
|
||||
<li>Click the Alexa button at the top of the console</li>
|
||||
<li>Click the Alexa Skills Kit Get Started button
|
||||
<ul>
|
||||
<li>Locate the skill for which you would like Launch Request support</li>
|
||||
<li>Click the “View Skill ID” link and copy the ID</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The configuration is the same as an intent with the exception being you will use your skill ID instead of the intent name.</p>
|
||||
<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">intent_script</span><span class="pi">:</span>
|
||||
<span class="s">amzn1.ask.skill.08888888-7777-6666-5555-444444444444</span><span class="pi">:</span>
|
||||
<span class="s">action</span><span class="pi">:</span>
|
||||
<span class="s">service</span><span class="pi">:</span> <span class="s">script.turn_on</span>
|
||||
<span class="s">entity_id</span><span class="pi">:</span> <span class="s">script.red_alert</span>
|
||||
<span class="s">speech</span><span class="pi">:</span>
|
||||
<span class="s">type</span><span class="pi">:</span> <span class="s">plain</span>
|
||||
<span class="s">text</span><span class="pi">:</span> <span class="s">OK</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2><a class="title-link" name="giving-alexa-some-personality" href="#giving-alexa-some-personality"></a> Giving Alexa Some Personality</h2>
|
||||
<p>In the examples above, we told Alexa to say <code class="highlighter-rouge">OK</code> when she successfully completed the task. This is effective but a little dull! We can again use <a href="/topics/templating/">templates</a> to spice things up a little.</p>
|
||||
<p>First create a file called <code class="highlighter-rouge">alexa_confirm.yaml</code> with something like the following in it (go on, be creative!):</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue