Site updated at 2017-04-22 12:14:35 UTC
This commit is contained in:
parent
027c8866c8
commit
7ab6214755
29 changed files with 69 additions and 39 deletions
|
@ -303,6 +303,32 @@ Custom slot type for script support.
|
|||
</code></pre>
|
||||
</div>
|
||||
<p>Alexa will now respond with a random phrase each time. You can use the include for as many different intents as you like so you only need to create the list once.</p>
|
||||
<p class="note">
|
||||
As of April 2017, the random filter has been somewhat broken. You’ll get a random response the first time this runs, but subsequent commands will reply with the same randomly-chosen phrase. On reboot, Home Assistant will pick a new random choice, but you’re stuck with that choice till you reboot. To get around that, use the following code in alexa_confirm.yaml:
|
||||
</p>
|
||||
<div class="language-text highlighter-rouge"><pre class="highlight"><code> >
|
||||
{% set responses = [
|
||||
"OK",
|
||||
"Sure",
|
||||
"If you insist",
|
||||
"Done",
|
||||
"No worries",
|
||||
"I can do that",
|
||||
"Leave it to me",
|
||||
"Consider it done",
|
||||
"As you wish",
|
||||
"By your command",
|
||||
"Affirmative",
|
||||
"Yes oh revered one",
|
||||
"I will",
|
||||
"As you decree, so shall it be",
|
||||
"No Problem"
|
||||
] %}
|
||||
{% set rindex = (range(0, (responses | length - 1) )|random) -%}
|
||||
{{responses[rindex]}}
|
||||
|
||||
</code></pre>
|
||||
</div>
|
||||
<h2><a class="title-link" name="flash-briefing-skills" href="#flash-briefing-skills"></a> Flash Briefing Skills</h2>
|
||||
<p>As of version <a href="/blog/2016/10/22/flash-briefing-updater-hacktoberfest/">0.31</a> Home Assistant supports the new <a href="https://developer.amazon.com/alexa-skills-kit/flash-briefing">Alexa Flash Briefing Skills API</a>. A Flash Briefing Skill adds a new Flash Briefing source that is generated by Home Assistant.</p>
|
||||
<h3><a class="title-link" name="configuring-a-flash-briefing-skill-in-home-assistant" href="#configuring-a-flash-briefing-skill-in-home-assistant"></a> Configuring a Flash Briefing skill in Home Assistant</h3>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue