diff --git a/atom.xml b/atom.xml index 4f075969ba..0f52f7d53a 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index e3f505128e..08cd3f707e 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 39a8fdc5e0..52dcce6e9f 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 7e7dabb7b1..cc5d55e34d 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 51f9759ea8..87364a9c3f 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 5f49f59e82..01e7851933 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index 8cec8e8cb8..e8acee21e2 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 7ae9966b4d..fa928ca511 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 03e3506bde..564734796a 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index e0e2b580ab..fe95f75340 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 23a9ac6e93..7203f0ad70 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 176e8b4b41..4cd2a01f19 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 2b12b526fa..5b81776985 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index b52a2276f0..1ab6217b15 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index f1da26926c..c4735b497e 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index cdccd83ec4..3b6b506fa2 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 090d75a1b5..e20c307355 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index 4d07a8bbc5..585ab633f1 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index a0074fc1c9..642360f3da 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2016-06-18T18:50:09+00:00 + 2016-06-18T19:14:49+00:00 https://home-assistant.io/ diff --git a/components/alexa/index.html b/components/alexa/index.html index 8dfedaa14c..bdf6eb09ca 100644 --- a/components/alexa/index.html +++ b/components/alexa/index.html @@ -253,6 +253,159 @@ WhereAreWeIntent where we are +

Working With Scenes

+ +

One of the more useful applications of Alexa integrations is to call scenes directly. This is easily achieved with some simple setup on the Home Assistant side and by letting Alexa know which scenes you want to run.

+ +

First we will configure Alexa. In the Amazon Interaction module add this to the intent schema:

+ +
+
{
+  "intent": "ActivateSceneIntent",
+  "slots":
+  [
+    {
+      "name" : "Scene",
+      "type" : "Scenes"
+    }
+  ]
+}
+
+
+
+ +

Then create a custom slot type called Scenes listing every scene you want to control:

+ +

+ +Custom slot type for scene support. +

+

The names must exactly match the scene names (minus underscores - amazon discards them anyway and we later map them back in with the template).

+ +

Add a sample utterance:

+ +
+
ActivateSceneIntent activate {Scene}
+
+
+
+ +

Then add the intent to your Alexa Section in your HA config file:

+ +
+
+    ActivateSceneIntent:
+      action:
+        service: scene.turn_on
+        data_template:
+          entity_id: scene.{{ Scene | replace(" ", "_") }}
+      speech:
+        type: plaintext
+        text: OK
+
+
+
+ +

Here we are using templates to take the name we gave to Alexa e.g. downstairs on and replace the space with an underscore so it becomes downstairs_on as Home Assistant expects.

+ +

Now say Alexa ask homeassistant to activate <some scene> and Alexa will activate that scene for you.

+ +

Adding Scripts

+ +

We can easily extend the above idea to work with scripts as well. As before, add an intent for scripts:

+ +
+
{
+  "intent": "RunScriptIntent",
+  "slots":
+  [
+    {
+      "name" : "Script",
+      "type" : "Scripts"
+    }
+  ]
+}
+
+
+
+ +

Create a custom slot type called Scripts listing every script you want to run:

+ +

+ +Custom slot type for script support. +

+ +

Add a sample utterance:

+ +
+
RunScriptIntent run {Scene}
+
+
+
+ +

Then add the intent to your Alexa Section in your HA config file:

+ +
+
+    RunScriptIntent:
+      action:
+        service: script.turn_on
+        data_template:
+          entity_id: script.{{ Script | replace(" ", "_") }}
+      speech:
+        type: plaintext
+        text: OK
+
+
+
+
+ +

Now say Alexa ask homeassistant to run <some script> and Alexa will run that script for you.

+ +

Giving Alexa Some Personality

+ +

In the examples above, we told Alexa to say OK when she succesfully completed the task. This is effective but a little dull! We can again use templates to spice things up a little.

+ +

First create a file called alexa_confirm.yaml with something like the following in it (go on, be creative!):

+ +
+
+          >
+          {{ [
+          "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"
+          ] | random }} 
+
+
+
+ +

Then, wherever you would but some simple text for a response likeOK, replace it with a reference to the file so that:

+ +
text: OK
+
+ +

becomes:

+ +
text: !include alexa_confirm.yaml
+
+ +

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.

+ + diff --git a/images/components/alexa/scene_slot.png b/images/components/alexa/scene_slot.png new file mode 100644 index 0000000000..94dddd5e3c Binary files /dev/null and b/images/components/alexa/scene_slot.png differ diff --git a/images/components/alexa/script_slot.png b/images/components/alexa/script_slot.png new file mode 100644 index 0000000000..913f478330 Binary files /dev/null and b/images/components/alexa/script_slot.png differ diff --git a/sitemap.xml b/sitemap.xml index cd4d7d6c46..1fd079f55a 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1766,26 +1766,26 @@ https://home-assistant.io/demo/frontend.html - 2016-06-18T18:49:23+00:00 + 2016-06-18T19:14:12+00:00 https://home-assistant.io/demo/index.html - 2016-06-18T18:49:23+00:00 + 2016-06-18T19:14:12+00:00 https://home-assistant.io/googlef4f3693c209fe788.html - 2016-06-18T18:49:23+00:00 + 2016-06-18T19:14:12+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html - 2016-06-18T18:49:23+00:00 + 2016-06-18T19:14:12+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html - 2016-06-18T18:49:23+00:00 + 2016-06-18T19:14:12+00:00 https://home-assistant.io/static/mdi-demo.html - 2016-06-18T18:49:23+00:00 + 2016-06-18T19:14:12+00:00